Possible to only migrate products?

I have started with my new Magento 2 store already. I changed my tree structures and set up all new stores. Is it possible to only migrate products? Products will be without category ofc, I understand that. Or is it necessary to remove all my categories, current products, attributes etc, before I migrate?
We also installed several plugins etc to test Magento 2 and don’t want to start on a new installation of Magento 2.

14 answers

Profile photo of ubdev Staff 98150.00 $tone February 18, 2021
Public

Hi Ted Sundin, 
Thanks for contacting us. 
We’d like to clarify as follows: 

Is it possible to only migrate products? Products will be without category ofc, I understand that.

With the current workflow of our module, you still need to migrate related data objects. That means, in order to migrate Products, you need to proceed with all steps from Step 1 to Step 5 (you can learn more about these steps in this article).
 
After the migration, you can disable or delete un-used categories. However, please note that after you disable or delete categories, you still need to assign the categories for migrated products in M2.
 
If re-assigning categories for the migrated product in M2 is not a problem for you, you can run the data migration as noted above from Step 1 -- 5, then disable/delete unused data.
 
PS. You should not delete migrated categories in M2 if you still plan to run delta migration for these categories after the first migration.
Regards,
Ubertheme team
 

#1
Profile photo of Ted Sundin 140.00 $tone February 18, 2021
Public

Thanks for quick answer! Will it be a problem if I have setup my stores already? (Stores in Magento 2 has other store view codes etc) Do I need to delete current stores still or will new stores be created same as Magento 1?
Can I have my current categories in Magento 2 if they have a different Root category? Or do I need to delete them anyway? Is it possible to migrate even though I have already created categories and deleted them? I was thinking of ID’s etc etc…
Many questions 🙂

#2
Profile photo of ubdev Staff 98150.00 $tone February 18, 2021
Public

Hi Ted Sundin,
We’d like to follow up further below: 

Do I need to delete current stores still or will new stores be created same as Magento 1?

Our module supports migrating data to your current M2 instance with existing sample data. So, removing the current Stores in M2 before running migration is optional.

Can I have my current categories in Magento 2 if they have a different Root category?

Yes, you can keep the existing categories in your M2.
 
Regards,
Ubertheme team

#3
Profile photo of ubdev Staff 98150.00 $tone February 18, 2021
Public

Hi Ted Sundin, 
Thanks for your purchase. 
Please follow strictly all required steps in the Readme manual (packed with your download package). If you get any issues, please pause the process and let us know here. 
We could not reply instantly, however, we will try our best to follow up as soon as possible. 
Regards,
Ubertheme team

#5
Profile photo of Ted Sundin 140.00 $tone February 18, 2021
Public

Thanks! I bought it and did a migration of 1 of my stores and products. Now I ran it again with all stores and stores view, which migrated but products with the new stores were not imported. Isn’t it possible to run the product migration again? 
Thanks!

#6
Profile photo of Mall Staff 184060.00 $tone February 18, 2021
Public

Hi there,

Isn’t it possible to run the product migration again? 

Yes, you can try these steps:

1. Run the following SQL query in your M2 DB:

UPDATE `ub_migrate_map_step_5` SET `offset` = 0 Where entity_name = 'catalog_product_entity';

2. And then, you run data migration in step #5 using the CLI command:

php -f bin/ubdatamigration run --step=5

Regards,
Mall.

#7
Profile photo of Ted Sundin 140.00 $tone February 19, 2021
Public

OK I did that and it ran probably 1200-1500 products until I get this error:
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field ‘sku’ doesn’t have a default value. The SQL statement executed was: INSERT INTO `inventory_source_item` (`quantity`, `status`, `source_code`) VALUES (:yp0, :yp1, :yp2)
 
Any idea?

#8
Profile photo of Ted Sundin 140.00 $tone February 19, 2021
Public

I also get this when I try to reindex:
Catalog Search index process unknown error:
{“error”:{“root_cause”:[{“type”:”resource_already_exists_exception”,”reason”:”index [magento2_product_1_v112/q4uD5Et4Tx-mTSv7QIvbOA] alreadyexists”,”index_uuid”:”q4uD5Et4Tx-mTSv7QIvbOA”,”index”:”magento2_product_1_v112″}],”type”:”resource_already_exists_exception”,”reason”:”index[magento2_product_1_v112/q4uD5Et4Tx-mTSv7QIvbOA] already exists”,”index_uuid”:”q4uD5Et4Tx-mTSv7QIvbOA”,”index”:”magento2_product_1_v112″},”status”:400}

#9
Profile photo of Mall Staff 184060.00 $tone February 19, 2021
Public

Hi Ted Sundin,

Message: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field ‘sku’ doesn’t have a default value. The SQL statement executed was: INSERT INTO `inventory_source_item` (`quantity`, `status`, `source_code`) VALUES (:yp0, :yp1, :yp2)

That issue occurred because your M1 DB had at least one product that didn’t have a value of SKU attribute.

Please try the steps below to handle that case:

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

//migrate product stock item
$this->_migrateCatalogProductStockItem(
$product->entity_id,
$product2->entity_id,
$product2->sku,
$keepOriginalId
);

and then replace it with:

//migrate product stock item
if (empty($product2->sku)) {
$product2->sku = "SKU-{$product2->entity_id}";
}
$this->_migrateCatalogProductStockItem(
$product->entity_id,
$product2->entity_id,
$product2->sku,
$keepOriginalId
);

2. And then, you continue with data migration in step #5 using the CLI command:

php -f bin/ubdatamigration run --step=5

Regards,
Mall.

#10
Profile photo of Ted Sundin 140.00 $tone February 19, 2021
Public

I also got this error after imported was successful when I was going to edit a product:
1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): The “componentType” configuration parameter is required for the “price_per_unit” component.
I get this error is related to MageWorx Advanced Product Options plugin. Anything you know how to fix?

#13
Profile photo of Mall Staff 184060.00 $tone February 19, 2021
Public

Hi there,

1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): The “componentType” configuration parameter is required for the “price_per_unit” component.
I get this error is related to MageWorx Advanced Product Options plugin. Anything you know how to fix?

That issue related to the settings of the custom product attribute ‘price_per_unit’ (please see this post for reference: 
https://stackoverflow.com/questions/64871339/componenttype-error-when-clicking-edit-product-in-magento-2-3-4
 
Since this associates with MageWorx product, please reach out to the team for further help. 

Regards,
Mall.

#14

Please login or Register to Submit Answer

Written By

Comments