How do I keep product ID the same ?

I need to keep product ID the same with the migration. Is this possible ?

  1. Profile photo of fka200fka200 200.00 $tone July 13, 2017
    Hello,I am using the newest version. To make it work with the import would I just delete all the current products then re-import? Also anyway to maintain the store ID when imported

14 answers

Profile photo of Mall Staff 184060.00 $tone July 13, 2017
Public

Hi there,

I need to keep product ID the same with the migration. Is this possible ?

Yes, it is possible. We have to add more small tweak code in our tool to do that. What version of our tool in your working now?
Regards,
Mall.

#1
Profile photo of fka200 200.00 $tone July 13, 2017
Public

Hello,I am using the newest version. To make it work with the import would I just delete all the current products then re-import? Also anyway to maintain the store ID when imported

#2
Profile photo of Mall Staff 184060.00 $tone July 13, 2017
Public

Hi there,

Hello,I am using the newest version.

So, please make sure that your M2 is a fresh install instance and then you can do steps as following to maintain the product IDs from M1 database:
Step 1: 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)) { //we don't take old product id

Step 2: Reset the data migration from step #5 -> #8
Step 3: Once done, you can redo data migration from steps #5 -> #8 to maintain Product IDs as you want.

Also anyway to maintain the store ID when imported

As you see, we have Website, Store and Store View. Do you want to maintain only for Store Ids?
Regards,
Mall.
 

#3
Profile photo of fka200 200.00 $tone July 13, 2017
Public

Yes I believe M2e extension need the same store ID and Product iD for migration. Do you know if it get passed through?
 
so do you think that I should delete all the products and re-import the product with this setting ?

#4
Profile photo of Mall Staff 184060.00 $tone July 13, 2017
Public

Hi there,

Yes I believe M2e extension need the same store ID

So, do you want to maintain the website and Store view IDs?

so do you think that I should delete all the products and re-import the product with this setting ?

Yes, you have to use the Reset function in our tool to remigrate your data from Step #2.
Regards,
Mall.

#5
Profile photo of fka200 200.00 $tone July 13, 2017
Public

WI’ll it work better if  I reinstall fresh Magento , install data migration tool, then make the edit and run the tool from scratch?

#6
Profile photo of Mall Staff 184060.00 $tone July 13, 2017
Public

Hi there,

WI’ll it work better if  I reinstall fresh Magento , install data migration tool, then make the edit and run the tool from scratch?

Yes, you could do by that way. Also, kindly confirm me exactly which objects you want to maintain the IDs from Magento1 database in following objects: Websites, Stores, Store Views. Do you want to maintain old IDs for all these objects?
Regards,
Mall.

#7
Profile photo of fka200 200.00 $tone July 13, 2017
Public

Yes I would love to maintain all these IDs when importing due to conflict with M2E — website store view and stores and product ID 

#8
Profile photo of Mall Staff 184060.00 $tone July 13, 2017
Public

Hi there,

Yes I would love to maintain all these IDs when importing due to conflict with M2E — website store view and stores and product ID 

So, kindly do steps as bellow:
Step 1: Install a Magento2 fresh instance.
Step 2: Install latest version of our tool as our guide.
Step 3: Once done, let’s provide me the admin credentials, ssh credentials, path to your Magento2 folder and phpmyadmin credentials of your Magento1 and Magento2 databases.
I will check further and help you to add more tweak code, which allow you maintain the Websites, Stores, Store views and products IDs as you want.
Regards,
Mall.
 

#10
Profile photo of fka200 200.00 $tone July 13, 2017
Public

Hello 
 
product ID worked ok — this was response for extension migration (M2e)
 
“For the Migration process to be successfully performed all the Product IDs and Store IDs have to be identical.”

#11
Profile photo of fka200 200.00 $tone July 13, 2017
Public

anyway to find the steps for STORE ID to be the same myself ? We don’t have final version of M2 yet just testing so I rather try and if I can’t do it then send credentials. Is this possible ? the previous code worked — products have correct ID… with M2 continue with correct increment ? 

#12
Profile photo of ubdev Staff 98150.00 $tone July 14, 2017
Public

Hi there,
Our team is having a 3-day holidays starting from today, and our office is closed at present.  
 
We know it’s not the right time to ask for delay in response to your question. We’ll get back to you as soon as possible next Monday. 
 
Thanks for your understanding and patience. 
 
Sincerely,
Ubertheme team

#13
Profile photo of Mall Staff 184060.00 $tone July 17, 2017
Public

Hi there,

 …and Store IDs have to be identical.”

To maintain the Websites, Stores and Store Views IDs from Magento1 database. Kindly do steps as my suggesting in my reply #10.
I will check further and provide you more tweak code in the Step 2 of our tool.
Regards,
Mall.

#14

Please login or Register to Submit Answer

Written By

Comments