bencurio / magento2-module-catalog-import-cli
该包已被废弃且不再维护。未建议替代包。
通过控制台命令导入目录
0.0.3
2023-03-29 14:57 UTC
Requires
- magento/module-import-export: 101.*
This package is auto-updated.
Last update: 2023-03-30 16:03:26 UTC
README
控制台命令用于导入目录文件。
安装
$ 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
用法
$ 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
: (默认var/import/images
) 必须是从您的 Magento 2.x 项目根目录开始的相对路径--entity_type
: (默认catalog_product
) 可能的值:advanced_pricing
、catalog_product
、customer_composite
、customer
、customer_address
、stock_sources
--behavior
: (默认add_update
) 可能的值:append
、add_update
、replace
、delete
--validation_strategy
: (默认validation-skip-errors
) 可能的值:validation-stop-on-errors
、validation-skip-errors
--allowed_errors_count
: (默认10
) 指定错误数量以停止导入过程--field_separator
: (默认,
)--multiple_value_separator
: (默认,
)--empty_attribute_value_constant
: (默认__EMPTY__VALUE__
)--fields_enclosure
: (默认false
) 使用字段封装- csv_file: 可以是相对路径或绝对路径到有效的CSV文件
示例
$ bin/magento catalog:import --images_path="." --behavior="add_update" --fields_enclosure mydb.csv