Magento – Migrate orders from Magento 1.x to 2.x using the Magento data migration tool

magento-1.9magento2magento2-migration-tool

The products, attribute sets, prices, categories, etc has been already migrated from Magento 1.x to Magento 2.x. I want to migrate the orders now.

Is it possible to migrate only orders from the Magento 2 data migration tool or is there any other way to migrate the orders?

I am also thinking of mapping the sales_flat table of Magento 1.x to the sales_order table of Magento 2 and push the CSV from MySQL.

Is there any other way?

Best Answer

Yes, you can use the data-migration-tool for this, and I'd recommend to do so over any other methods: it will do the necessary field value conversions where needed.

We were in a similar position as you: we imported product data (catalog, products) at an earlier point in time, then built the shop's design and functionalities and now will do a final data migration run for the customers, quotes, orders, logs and similar stuff.

In the config.xml, comment out the substeps you do not want to run again. in my case, I have the following disabled:

  • settings: everything
  • data: eav step, url rewrite step, configurable prices step, tier price step, post processing step

  • in map.xml, I made sure to ignore all tables that I do not want the data to be migrated for.

Be sure to include the necessary

<ignore><document>{tablename}</document></ignore>

in both sections (<source> and <destination> (maybe called <target> in older versions)).

Be sure to test the migration on a copy of your db's (both magento 1.x and magento 2.x) as it can be quite destructive. It took me a few days and tries to get the mappings adjusted to our needs, but now the migration runs through without a hick.

I was not able to get the delta migration properly running with the above modifications, but in most cases, you'll only want to migrate the data just once before switching the new shop live.

If your 1.x shop has a fair amount of data, the migration process will take quite a while tho. be sure to run the migration in a screen shell session or similar to avoid data loss due to disconnects.