We are trying convert 1.9 to 2.1.2 version. How do we retain the customer id and product ids from the old database? When we atried conversion, the tool generates new sequence from 1…
3 answers
Hi lakvenkat,
How do we retain the customer id and product ids from the old database?
Our migration tool allows to migrate data to a Magento 2 instance with existing of data. Thus, the option you mentioned is not ready in default settings.
If you wish to retain your Customers and Products Ids from Magento 1 database, I will provide you some tweak code to do that (upon your confirmation). But please note this option only works with a fresh Magento 2 installation.
Regards,
Mall.
Thank you for your quick response. Please provide. Hope the same code will take care of orderids as well…
Hi lakvenkat,
To retail the Products Ids:
Open the php file at path: pub/ub-tool/protected/controllers/Step5Controller.php
and find to the code line:
if ($key != 'entity_id' AND isset($product->$key)) { //we don't take old product id
and replace it by code line:
if (isset($product->$key)) {
To retail the Customer Ids:
Open the php file at path: pub/ub-tool/protected/controllers/Step6Controller.php
and find to the code line:
$customer2->entity_id = null;
and replace it by code line:
//$customer2->entity_id = null;
And then you can retail your Products vs Customers Ids from your Magento1 database in data migration with our tool.
Regards,
Mall.