Error in deltamigration – step 5

Hi,
after the first migration when I run the deltamigration from cli, your tool update the SKUS of all products but adding suffix {SKU}_{M2ID}
How can I avoid this?
Regards

5 answers

Profile photo of Mall Staff 167790.00 $tone July 6, 2021
Public

Hi there,

after the first migration when I run the deltamigration from cli, your tool update the SKUS of all products but adding suffix {SKU}_{M2ID}

What is the version of our module which you used in the first migration?

The issue you mentioned occurred because there were some existing product’s in M2 which had the same SKUs as the migrated products, thus our migration tool appended the suffix to the product’s ID when migrating these products to your M2.

Regards,
Mall.

#1
Profile photo of vale_ruggio 70.00 $tone July 6, 2021
Public

Hi, thank you for your quick response.
Migration Tool is 2.3.6
I tried with a fresh M2 install, first import (just until step-5 I didn’t need step-6-7-8) went fine.
Then I tried with delta-migration by GUI, it adds only new products (as you described on your website).
The problem is when I want to update even old products.
After the first migration, of course old products will exists on M2, so can you please explain me if I’m doing something wrong or
if adding _{sku} is the expected behaviour.
If Yes, can you explain me how to migrate without _{sku}?

#2
Profile photo of Mall Staff 167790.00 $tone July 7, 2021
Public

Hi there,

Migration Tool is 2.3.6

It seems that you are using the latest version 3.2.6 of our module (not the v2.3.6). Please correct if we’re wrong. 

The problem is when I want to update even old products.
After the first migration, of course old products will exists on M2, so can you please explain me if I’m doing something wrong or
if adding _{sku} is the expected behaviour.
If Yes, can you explain me how to migrate without _{sku}?

That is strange. But please note that for that case our migration added a suffix with the format: SKU_EntityID (SKU and product’s entity ID in M1)

Meanwhile, please help to provide additional info below:

  • How many products had the issue you mentioned?
  • Does your M1 DB have a product that has no product’s SKU? Can you provide me screenshots of that product in both M1 and in M2 (after being migrated)?

I will help to check further and get back to you then.

Regards,
Mall.
 
 
 
 
 
 

#3
Profile photo of vale_ruggio 70.00 $tone July 17, 2021
Public

Hi, I think that there is a bug in your code.
So now I have fixed It in my local installation, please check it and correct.
The is in pub/ub-tool/protected/controllers/Step5Controller.php at line 653 -- 655
Just comment this
/*if ($found) {
$sku2 = “{$found->sku}_{$found->entity_id}”;
}*/
 
Regards

#4
Profile photo of Mall Staff 167790.00 $tone 6 days ago
Public

Hi there,
I am sorry for getting back to you this late as our team has just been back from our weekend. 

please check it and correct.
The is in pub/ub-tool/protected/controllers/Step5Controller.php at line 653 — 655
Just comment this
/*if ($found) {
$sku2 = “{$found->sku}_{$found->entity_id}”;
}*/

Please note that code lines are to ensure the products’ SKUs are unique in the delta migration in Step #5. 

So, you shouldn’t comment that code. Instead, you can add the tweak code for that context:

1. Open the PHP file at: pub/ub-tool/protected/controllers/Step5Controller.php
and find the code line:

$found = Mage2CatalogProductEntity::model()->find("sku = '" . addslashes($sku2) . "'");

and replace it with:

$con = "sku = '" . addslashes($sku2) . "' AND entity_id <> {$productId2}";
$found = Mage2CatalogProductEntity::model()->find($con);

2. Once done, you continue with the delta migration in step #5. 

Regards,
Mall.
 

#5

Please login or Register to Submit Answer

Written By

Comments