{"id":21926873,"url":"https://github.com/hounddd/wn-mallimportexport-plugin","last_synced_at":"2025-10-09T18:37:36.519Z","repository":{"id":56986047,"uuid":"410036013","full_name":"Hounddd/wn-mallimportexport-plugin","owner":"Hounddd","description":"Update (import) or export products data to OFFLINE.mall plugin","archived":false,"fork":false,"pushed_at":"2023-02-13T16:27:46.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-12-15T02:52:07.774Z","etag":null,"topics":["octobercms-plugin","offline-mall","wintercms-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hounddd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-24T16:44:05.000Z","updated_at":"2021-12-22T19:56:38.000Z","dependencies_parsed_at":"2024-11-29T02:00:10.468Z","dependency_job_id":null,"html_url":"https://github.com/Hounddd/wn-mallimportexport-plugin","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"52ba2dc73fc848afa690a6eaeb974be13bbcbc2c"},"previous_names":[],"tags_count":8,"template":null,"template_full_name":null,"purl":"pkg:github/Hounddd/wn-mallimportexport-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hounddd%2Fwn-mallimportexport-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hounddd%2Fwn-mallimportexport-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hounddd%2Fwn-mallimportexport-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hounddd%2Fwn-mallimportexport-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hounddd","download_url":"https://codeload.github.com/Hounddd/wn-mallimportexport-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hounddd%2Fwn-mallimportexport-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001895,"owners_count":26083226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["octobercms-plugin","offline-mall","wintercms-plugin"],"created_at":"2024-11-28T22:11:57.208Z","updated_at":"2025-10-09T18:37:36.475Z","avatar_url":"https://github.com/Hounddd.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mall Import/Export\n\nThis plugin offers the possibility to import or export data into the [OFFLINE.Mall](https://github.com/OFFLINE-GmbH/oc-mall-plugin) plugin.  \n\n***\n⚠ **Please note that it does NOT allow you to add products but to update existing products**.\n\n***\n\n## What you can import or export\n\n - publication status\n - stocks\n - authorisation for sales out of stock\n - weight\n - prices, additional prices and group prices, in all currencies.\n - [and whatever you decide](#mallimportexportownfields)\n\n\n## How it works\nThe plugin uses the CSV file [import/export features of WinterCMS](https://wintercms.com/docs/backend/import-export).\n\nWith default options, exporting data will give you a CSV file named `Products_export_2021-09-23.csv`.  \n\n### Columns naming \nThe plugin use currencies symbols to append same to the column name.\n - The prices columns will be named \"Price $\", \"Price €\", ... \n - The customers prices columns will be named \"Price *pricename* $\", \"Price *pricename* €\", ... \n    \u003cbr /\u003eex for a \"Vip\" customer price : \"Price vip $\", \"Price vip €\", ... \n - The defined price categories use their own names \"*Price category name* $\", \"*Price category name* €\", ...\n    \u003cbr /\u003eex for a \"Old price\" price category : \"Old price $\", \"Old price €\", ... \n\nYou can define your own filename, date or column's names from [config](#mallimportexportconfig).\n\n### \u003ca name=\"mallimportexportownfields\"\u003e\u003c/a\u003eAdd your own columns\nYou can listen for `hounddd.mallimportexport.config.update` event to add your own column definition.\n\n#### Example to add the product's name to export fields, at the second position\n```php\n/**\n * Extend products controller export columns definition\n */\nEvent::listen('hounddd.mallimportexport.config.update', function ($controller, $config) {\n    $exportColumns = $config-\u003eexport['list']-\u003ecolumns;\n    $position = 1;\n\n    $config-\u003eexport['list']-\u003ecolumns = \n        array_slice($exportColumns, 0, $position, true) +\n        [\n            'name' =\u003e [\n                'label' =\u003e 'offline.mall::lang.product.name'\n            ]\n        ] + \n        array_slice($exportColumns, $position, count($exportColumns) - 1, true);\n});\n```\n\n### Integration\nIf the version of your OFFLINE.Mall plugin includes event hooks for toolbars (\u003e= 1.14.4), you will find the import and export buttons at the top of the product list, otherwise an entry will be added to the side menu of the plugin.  \nButtons are available according to the user rights.\n\n## Installation\n*Let assume you're in the root of your wintercms installation*\n\n### Using composer\nJust run this command\n```bash\ncomposer require hounddd/wn-mallimportexport\n```\n\n### Cloning repo\nClone this repo into your winter plugins folder.\n\n```bash\ncd plugins\nmkdir hounddd \u0026\u0026 cd hounddd\ngit clone https://github.com/Hounddd/wn-mallimportexport mallimportexport\n```\n## \u003ca name=\"mallimportexportconfig\"\u003e\u003c/a\u003eConfiguring\n### Import/export behaviors\nYou can configure plugin behaviors with a file `\\config\\hounddd\\mallimportexport\\config.php`\n\n```php\n\u003c?php\n\nreturn [\n    'import' =\u003e [\n    ],\n\n    'export' =\u003e [\n        'fileName' =\u003e 'Export_produits',    // New export filename, default \"Products_export\"\n        'appendDate' =\u003e true,               // Append date to filename, default true\n        'dateFormat' =\u003e '_Y-m-d-z',         // How to format appended date, default '_Y-m-d'\n    ],\n\n    'useCurrencySymbol' =\u003e true,            // Use currency symbol (true), code (false), or nothing (null), default true\n    'removeDiacritics' =\u003e false,            // Remove diactritcis chars in additional prices column labels, default false\n];\n```\n - **useCurrencySymbol** : (default true) Defined if additionnal price columns must use currency symbol ou currency code.  \n - **removeDiacritics** : (default false) Defined if diacritics characters must be removed from prices and additionnal prices column labels.  \n\nFor the other columns use the translations (see below).  \nThis allows you to bypass encoding problems with import or export files.  \n\nSee [PHP date format](https://www.php.net/manual/datetime.format.php) for dateFormat accepted values.  \nRemember that this is for the name of a file, respect the conventions to avoid trouble.\n\n### Csv file column's names\nYou can change the column names to match your needs, simply add a `\\lang\\XX\\hounddd\\mallimportexport\\lang.php` (where XX is your locale) to your site.\n```php\n\u003c?php\n    return [\n\n        'columns' =\u003e [\n            'allow_out_of_stock_purchases' =\u003e 'Vente hors stock',\n            'price'                        =\u003e 'Prix en',\n            'published'                    =\u003e 'Publié',\n            'stock'                        =\u003e 'Stock',\n            'user_defined_id'              =\u003e 'Référence',\n            'weight'                       =\u003e 'Poids en g',\n        ],\n\n    ];\n\n```\n\n***\nMake awesome sites with [WinterCMS](https://wintercms.com)!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhounddd%2Fwn-mallimportexport-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhounddd%2Fwn-mallimportexport-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhounddd%2Fwn-mallimportexport-plugin/lists"}