comment out or remove line 20 to 31 in map.xml file,
<!-- <ignore>
<document>sales_flat_creditmemo_grid</document>
</ignore>
<ignore>
<document>sales_flat_invoice_grid</document>
</ignore>
<ignore>
<document>sales_flat_order_grid</document>
</ignore>
<ignore>
<document>sales_flat_shipment_grid</document>
</ignore> -->
Add inside <document_rules>
tag of source tag,
<rename>
<document>sales_flat_order_grid</document>
<to>sales_order_grid</to>
</rename>
<rename>
<document>sales_flat_invoice_grid</document>
<to>sales_invoice_grid</to>
</rename>
<rename>
<document>sales_flat_creditmemo_grid</document>
<to>sales_creditmemo_grid</to>
</rename>
<rename>
<document>sales_flat_shipment_grid</document>
<to>sales_shipment_grid</to>
</rename>
Add below content under <field_rules>
tag of source tag.
<move>
<field>sales_flat_creditmemo_grid.grand_total</field>
<to>sales_creditmemo_grid.order_base_grand_total</to>
</move>
<!-- source table custom grid field-->
<ignore>
<field>sales_flat_invoice_grid.base_grand_total</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.store_to_order_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.base_to_order_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.store_to_base_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.base_to_global_rate</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.creditmemo_status</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.invoice_id</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.store_currency_code</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.order_currency_code</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.base_currency_code</field>
</ignore>
<ignore>
<field>sales_flat_creditmemo_grid.global_currency_code</field>
</ignore>
comment out or remove line inside <destination>
<document_rules>
tag,
<!-- <ignore>
<document>sales_creditmemo_grid</document>
</ignore>
<ignore>
<document>sales_invoice_grid</document>
</ignore>
<ignore>
<document>sales_order_grid</document>
</ignore>
<ignore>
<document>sales_shipment_grid</document>
</ignore>-->
Add below line inside <destination>
part of <field_rules>
tag
<ignore>
<field>sales_order_grid.billing_address</field>
</ignore>
<ignore>
<field>sales_order_grid.shipping_address</field>
</ignore>
<ignore>
<field>sales_order_grid.shipping_information</field>
</ignore>
<ignore>
<field>sales_order_grid.customer_email</field>
</ignore>
<ignore>
<field>sales_order_grid.customer_group</field>
</ignore>
<ignore>
<field>sales_order_grid.subtotal</field>
</ignore>
<ignore>
<field>sales_order_grid.shipping_and_handling</field>
</ignore>
<ignore>
<field>sales_order_grid.customer_name</field>
</ignore>
<ignore>
<field>sales_order_grid.payment_method</field>
</ignore>
<ignore>
<field>sales_order_grid.total_refunded</field>
</ignore>
<ignore>
<field>sales_invoice_grid.store_name</field>
</ignore>
<ignore>
<field>sales_invoice_grid.customer_name</field>
</ignore>
<ignore>
<field>sales_invoice_grid.customer_email</field>
</ignore>
<ignore>
<field>sales_invoice_grid.customer_group_id</field>
</ignore>
<ignore>
<field>sales_invoice_grid.payment_method</field>
</ignore>
<ignore>
<field>sales_invoice_grid.billing_address</field>
</ignore>
<ignore>
<field>sales_invoice_grid.shipping_address</field>
</ignore>
<ignore>
<field>sales_invoice_grid.shipping_information</field>
</ignore>
<ignore>
<field>sales_invoice_grid.subtotal</field>
</ignore>
<ignore>
<field>sales_invoice_grid.shipping_and_handling</field>
</ignore>
<ignore>
<field>sales_shipment_grid.customer_name</field>
</ignore>
<ignore>
<field>sales_shipment_grid.order_status</field>
</ignore>
<ignore>
<field>sales_shipment_grid.billing_address</field>
</ignore>
<ignore>
<field>sales_shipment_grid.shipping_address</field>
</ignore>
<ignore>
<field>sales_shipment_grid.billing_name</field>
</ignore>
<ignore>
<field>sales_shipment_grid.shipping_name</field>
</ignore>
<ignore>
<field>sales_shipment_grid.customer_email</field>
</ignore>
<ignore>
<field>sales_shipment_grid.customer_group_id</field>
</ignore>
<ignore>
<field>sales_shipment_grid.payment_method</field>
</ignore>
<ignore>
<field>sales_shipment_grid.shipping_information</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.billing_address</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.shipping_address</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.customer_group_id</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.order_status</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.customer_name</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.customer_email</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.payment_method</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.shipping_information</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.subtotal</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.shipping_and_handling</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.adjustment_positive</field>
</ignore>
<ignore>
<field>sales_creditmemo_grid.adjustment_negative</field>
</ignore>
save map.xml file and
run php magento migrate:data /var/www/html/{{magentoroot}}/vendor/magento/data-migration-tool/etc/ce-to-ce/{{CE version}}/config.xml
For Data migration from Magento 1 to Magento 2.
Your first step is Setting migrate,
command is:
php bin/magento migrate:settings /var/www/html/{{magento2}}/vendor/magento/data-migration-tool/etc/ce-to-ce/{{magento1 version}}/config.xml
All System -> Configuration
settings are migrated in setting migrate.
After completion of setting migrate, You need to check in Magento 2 Stores -> Configuration
setting.
In migrate setting, From your database table, core_config_data
have affected.
All Magento 1 settings are migrated to magento 2.
Thanks.
Best Answer
Data Migration from Magento 1 to Magento 2 is a bit technical if you are a newbie or a new Magento learner. You can start the migration process by installing the Magento 2 Data Migration Tool via composer.
To install this tool, make sure that the version of Magento 2 and Data Migration Tool matches exactly. For example, if you are using Magento v2.1.2, you must install Data Migration Tool v2.1.2.
If you are worried about the version of your Magento 2, you can find it out by navigating to the root directory of your Magento 2 via SSH terminal and enter the following command:
Now, once you know the version of your Magento 2 store, you can now install the Data Migration Tool. I am sharing 2 CLI commands with you. The 1st command will update the location of the Data Migration Tool package in the composer.json file and the 2nd command will install the tool in your Magento 2 store. Run the following commands to carry out this job:
In the above CLI command,
<version>
refers to the version of Data Migration Tool which must match with the Magento 2 version discovered earlier. For example, if you are using Magento 2.1.2, enter the exact below commands:You will be asked to enter your authentication keys. Go to Magento Marketplace. Sign in using your login credentials, click My Access Keys and get your public and private key. After that within few seconds, the Data Migration Tool will be successfully installed on your Magento 2 store.
After the installation, the following directories will contain mapping and configuration files for the Data Migration Tool:
contains configuration and scripts for migrating from Magento 1 Community Edition to Magento 2 Community Edition, and
contains configuration and scripts for migrating from Magento 1 Community Edition to Magento 2 Enterprise Edition, and
contains configuration and scripts for migrating from Magento 1 Enterprise Edition to Magento 2 Enterprise Edition.
Before you migrate any settings and data, you must create a
config.xml
file in the relevant directory. For example, if you are performing data migration from Magento 1 CE to Magento 2 CE, navigate to theMagento 2 root dir/vendor/magento/data-migration-tool/etc/ce-to-ce/<Magento 1.x version>
directory and renameconfig.xml.dist
toconfig.xml
.Next, open
config.xml
in a code editor and specify the following:In the above code,
<source>
has the database information of Magento 1 and<destination>
has the relevant information of Magento 2.<crypt_key>
is mandatory to fill in. It is the encryption key of Magento 1 which can be found inMagento 1 root dir/app/etc/local.xml
file in<key>
tag.When finished, save the
config.xml
and you are done!Now, To migrate the settings, navigate to your Magento 2 root directory via SSH terminal and run the following command:
where
<path to your config.xml>
this would bevendor/magento/data-migration-tool/etc/ce-to-ce/<Magento 1.x version>/config.xml
. I have also used--reset
argument in the above command which forces the Data Migration Tool to start from the beginning.And finally, to migrate data, run the following CLI command:
As this command runs, the Data Migration Tool saves its current progress, and in the case of any errors, stops the process and resumes the progress from the last known good state. Also, the Data Migration Tool may report some errors during the migration. I advise you to refer the Troubleshooting page of the Data Migration Tool for further assistance.
Once the data migration is completed, you will receive a success message. For further reference, you can visit the below blog post:
How To Migrate From Magento 1 To Magento 2