Import Customer with cron command in CSV or JSON format
``vml/magento2-module-customerimport``
Import Customer with cron command which is supplied via CSV or JSON format.
-
Unzip the zip file in
app/code/Vml/CustomerImport
-
Enable the module by running
php bin/magento module:enable Vml_CustomerImport
-
Run Magento commands by running
php bin/magento set:upg && php bin/magento set:d:c && php bin/magento set:s:d -f && php bin/magento c:c && php bin/magento c:f
-
Give
var
andpub
folder to 777 permission by runningchmmod -R 0777 var/ pub/
-
Install the module composer by running
composer require vml/magento2-module-customerimport
-
Enable the module by running
php bin/magento module:enable Vml_CustomerImport
-
Run Magento commands by running
php bin/magento set:upg && php bin/magento set:d:c && php bin/magento set:s:d -f && php bin/magento c:c && php bin/magento c:f
-
Give
var
andpub
folder to 777 permission by runningchmmod -R 0777 var/ pub/
Create customers from CSV or JSON file from command line terminal.
bin/magento customer:import <profile-name> <source>
So to import from the CSV and the JSON respectively the user would execute either one of the following
-
php bin/magento customer:import --help
-
Description: Customer Import via CSV & JSON
-
Usage: customer:import
-
Arguments: profile Profile name ex: sample-csv or sample-json source Source Path ex: sample.csv or sample.json
bin/magento customer:import sample-csv sample.csv
bin/magento customer:import sample-json sample.json
Once we run our customer import script, we also need to make sure to re-index the Customer Grid indexer
`php bin/magento indexer:reindex customer_grid`