Hello I would like to aask why you decided to not maintain same ID for:
- Products
- Invoices
- Credit memos
- Shippings
- Customers
Maybe you decided to improve some importing but, can you explain us this decision? It’s important for us to keep same id for
- Products
- Invoices
- Credit Memos
- Shippings
I already changed Step5 to keep same product ID but I don’t know well how to do this with the rest. Can you please tell us how to keep same Id for this things?
15 answers
Hi Sergio B,
It’s true that the IDs are auto-incremental. We use this approach that aims at allowing to migrate data from M1 to M2 with existing of data (customers, sales orders…).
If you want to keep the same IDs as you mentioned, we’re afraid it will need customization for your specific case. If this is what you will consider, we will provide you the estimated quote upon your confirmation.
Regards,
Ubertheme team
I’m still having the same question, why your script does not save the same incremental ID for all ? You already posted how to maintain same product id, why not the rest ? Do you mean Magento 2 with already data?
As you should know, you cannot have different invoices with different IDs, this can be give law troubles.
Hi Sergio B,
We’d like to clarify a little bit further about the auto-incremental IDs.
If our migration tool keeps the original IDs of objects in M1, then it causes conflict with the M2 instance with existing data. Hence, auto-incremental IDs is the solution to solve such issue.
If you want to keep all M1 IDs the same and port to M2 on as-is basis, it will need additional customization for our tool to meet your need, as mentioned in our previous reply. Also it is mandatory that your M2 must be a fresh instance.
Regards,
Ubertheme team
If our migration tool keeps the original IDs of objects in M1, then it causes conflict with the M2 instance with existing data.
Oh OK the thing is our Magento 2 instance WAS (before migrating data with your tool) completely a new fresh install, as you instruct in the readme file
So why your code is prepared for non-new fresh installs ? I think this is not a customization, what you propose it gives me to think badly
Hi Sergio B,
We see your concern. Our tool uses a single codebase which is applicable for both fresh instance and instance with existing data. So the auto-incremental is default for all cases. That’s why we refer to the customisation for the tool to keep original IDs as you wish.
Further, the fresh instance is to refer to our recommendation that users should focus on the data migration as the first priority task, rather than integrating 3rd extensions or customisation before migrating data which might lead to unexpected conflict.
Regards,
Ubertheme team
Our tool uses a single codebase which is applicable for both fresh instance and instance with existing data
OK fine so can you bring me the customizations so I can apply them? I can give you access to our repo too.
We already followed this guide and works, but this is only for product id.
Hi there,
OK fine so can you bring me the customizations so I can apply them? I can give you access to our repo too.
We’d like to re-confirm that to keep original IDs, your Magento 2 must be a fresh instance.
Also, please let us know which objects you want to keep ID, so that we could provide you estimated quote for the customization.
Regards,
Mall.
- Invoices
- Credit memos
It’s basic, because you cannot have two invoices and credit memos with the same ID, it’s illegal. So when you declare those invoices, then Tax Agency can inspect this.
Hi Sergio B,
We will send you an email shortly regarding the original IDs.
For the tweak to keep IDs of Invoices and Credit Memos, you can follow steps below:
- Invoices
To keep M1’s invoices IDs you could do the following steps:
-- Open the php file at: pub/ub-tool/protected/controllers/Step7Controller.php
and find the line:
$salesInvoice2->entity_id = null;
and replace it with:
//$salesInvoice2->entity_id = null;
- Credit memos
To keep M1’s credit memos IDs:
-- Open the php file at: pub/ub-tool/protected/controllers/Step7Controller.php
and find the line:
$salesCredit2->entity_id = null;
and replace it with:
//$salesCredit2->entity_id = null;
Once done, you make sure that, your Magento2 is a fresh instance and you must reset the step #7 and restart data migration in this step.
Regards,
Mall.
Just a question, can I run reset option from the extension to begin this?
It worked, I can do incrementals and the IDs are correct but, I tried to create an order from frontend and the ID was like 00000001.
Maybe a problem with incrementals ?
Hi there,
Maybe a problem with incrementals ?
No, that is working rules of Magento2. You can check more about that in sales sequence meta data table as this: https://prnt.sc/gbo4el
Regards,
Mall.
I see *_0 and *_1, corresponding to different websites I thought.
for sequence_order_1 there’s a row with a value=1, and incremental as “2”.
Please could you give me more details?
Hi there,
Please could you give me more details?
You could view more at this post: https://mage2.pro/t/topic/511
Regards,
Mall