bencurio / magento2-module-catalog-import-cli
Import catalog via console command
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 19
Open Issues: 2
Type:magento2-module
Requires
- magento/module-import-export: 101.*
This package is auto-updated.
Last update: 2023-03-30 16:03:26 UTC
README
A console command for importing catalog files.
Install
$ composer require bencurio/magento2-module-catalog-import-cli $ php bin/magento module:enable Bencurio_CatalogImportCommand $ php bin/magento setup:upgrade $ php bin/magento setup:di:compile $ php bin/magento cache:clean
Usage
$ bin/magento catalog:import \ [-i|--images_path[="..."]] \ [-p|--entity_type[="advanced_pricing|catalog_product|customer_composite|customer|customer_address|stock_sources"]] \ [-b|--behavior[="append|add_update|replace|delete"]] \ [-v|--validation_strategy[="validation-stop-on-errors|validation-skip-errors"]] \ [-c|--allowed_errors_count[=100]] [-s|--field_separator[=","]]] \ [-m|--multiple_value_separator[=","]]] \ [-e|--empty_attribute_value_constant[="..."]] \ [-f|--fields_enclosure] \ csv_file
--images_path
: (defaultvar/import/images
) must be a relative path starting from your Magento 2.x project root--entity_type
: (defaultcatalog_product
) possible values:advanced_pricing
,catalog_product
,customer_composite
,customer
,customer_address
,stock_sources
--behavior
: (defaultadd_update
) possible values:append
,add_update
,replace
,delete
--validation_strategy
: (defaultvalidation-skip-errors
) possible values:validation-stop-on-errors
,validation-skip-errors
--allowed_errors_count
: (default10
) specify number of errors to halt import process--field_separator
: (default,
)--multiple_value_separator
: (default,
)--empty_attribute_value_constant
: (default__EMPTY__VALUE__
)--fields_enclosure
: (defaultfalse
) use fields enclosure- csv_file: could be a relative or an absolute path to a valid CSV file
Example
$ bin/magento catalog:import --images_path="." --behavior="add_update" --fields_enclosure mydb.csv