Issue Importing Grouped Products and proposed possible solution

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
After looking into the DB and the product data once exported, I can see that there is a problem with importing Grouped Products. Now I have had a good look around the forums but cannot (yet?) see anything related.

The issue is, if you are importing new products, you can create the "Parent Product" with it's correct Type and Template OK, but in your import data, for the child product rows, you cannot assign the ParentProductId as it has not yet been created. Matching on Product Name cannot work in this instance as the name is different for each child indicating different sizes, related parts and other attributes etc

the only workaround I can come up with so far, is to create two import files, one with only the Parent Products, import this first, then export your parent products from the DB to get the ID's, manually update the Child Products import file with the parent Id's, then import the Child products.

It is a bit long winded and works only if you have a small data set, if you have thousands of products (with hundreds of grouped products as we do), this is an issue, you simply can't manually process all those updates to the import file in only one lifetime!

if anyone has seen the same issue i would like to know, especially like to know if someone has a better solution or workaround than the one i am using.

My suggestion for solving this, is that the processing of the Import should be adjusted to use the Parent Product's SKU to Identify the correct record with which to associate the "Child" products. This should not be a stretch as the import is already checking SKU's to decide on Insert or Update. As long as the parent record is, both, of ProductType="Grouped Product" and is positioned in the file and imported before it's child products, the Id will be there to query (by SKU) and use for the ParentGroupedProductId in the child products insert.

Seems the right way to me, NOP people, what is your opinion on this?

V3.80/IIS/Win2012Svr/SQLSRV2012 (45000 products and growing)
7 years ago
var productNew = new Product();
_productService.InsertProduct(productNew);
var productAssociated =  new Product();
productAssociated.ParentGroupedProductId = productNew.Id;
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.