macopedia / magento2-categoryimporter
Category Importer for Magento 2
Installs: 4 447
Dependents: 0
Suggesters: 0
Security: 0
Stars: 34
Watchers: 16
Forks: 23
Open Issues: 2
Type:magento2-module
Requires
- magento/framework: >=100.1.0
- magento/module-store: >=100.0.0
This package is auto-updated.
Last update: 2024-11-06 08:41:03 UTC
README
Simple category importer from CSV file. Allows to import / update categories not only from Magento shops (use old shop category ID)
Features
- adds attribute to category 'Old category ID'
- adds possibility to add custom attribute codes by command option
- adds links between parent and child categories (by 'Old category ID')
- work only for admin store (multi stores are not implemented yet)
Install module
- add module via composer or download and copy files to app/code/Macopedia/CategoryImporter
- run bin/magento module:enable Macopedia_CategoryImporter in command line
Usage
NOTICES:
- please add parent categories before children in file
- use semicolon (';') as delimiter in file
Attributes supported by default:
-
Required attributes:
- id
- name
- parent_id
-
Optional attributes with predefined values:
- is_active - default value: 1
- is_anchor - default value: 1
- include_in_menu - default value: 1
- custom_use_parent_settings - default value: 1
-
Base additional attributes:
- description
- meta_title
- meta_keywords
- meta_description
- url_key
- url_path
- position
Base usage examples
bin/magento import:categories [--path|-p <path to file in Magento dir>] [--additional|-a <additional attributes separated by comma>]
bin/magento import:categories -p var/import/categories-example.csv
bin/magento import:categories -p var/import/categories-example.csv -a my_custom_attribute1,my_custom_attribute2,my_custom_attribute3
Simple CSV file to import categories
id;name;parent_id
10;Category name 1;null
11;Category name 2;null
20;First child of cat 1;10
21;First child of cat 2;11
22;Second child of cat 2;11