Demo module for Habr.
$ cd ${MAGE_ROOT}
$ composer require flancer32/mage2_ext_demo_import
$ ./bin/magento module:enable Flancer32_DemoImport
$ ./bin/magento setup:upgrade
$ ./bin/magento setup:di:compile
Place importing data into ./etc/data/products.json
(image paths are related to ./etc/data/img/
):
[
{
"sku": "...",
"name": "...",
"desc": "...",
"desc_short": "...",
"price": ...,
"qty": ...,
"categories": ["..."],
"image_path": "..."
}
]
... then run command:
$ ./bin/magento fl32:import:prod -t regular
$ ./bin/magento fl32:import:prod -t direct