- Posts: 149
- Thank you received: 6
Export is missing product_parent_id values
-- Joomla version -- : 3.9.21
-- PHP version -- : 7.3.22
-- Browser(s) name and version -- : Safari
Has the Parent ID field when using Variants changed lately?
I just exported products from a test site to CSV and there are no product_parent_id values, even though there are a few product I created last night with 8-10 Variants each.
Are custom Product Codes for Variants still allowed (as opposed to using the automatically generated Product Codes)?
Since we use lots of Variant pricing for package sizes, I do much of my inventory management via CSV import and export instead of using the Hikashop Product interface.
Please Log in or Create an account to join the conversation.
We did one change to the products export system in the 4.4.0:
And I think it's linked to that.We've improved the product CSV export to be based on the type of the columns in the database in order to better handle conversion of types when generating the CSV file.
Add the line:
Please Log in or Create an account to join the conversation.
Can I assume this will be included in future releases? or will I need to keep my customization as I upgrade?
Thank you very much.
Please Log in or Create an account to join the conversation.
Thanks for your feedback. Yes, it will be included.
Please Log in or Create an account to join the conversation.
In the past, I have updated most of my datasets using CSV imports, including variants and variant pricing. With 4.4.0, I exported the Product with Variants, the data appeared as I expected.
I then attempted to import that complete set of data with minor alterations to the product_name, product_alias and pricing values of the Variant records.
The result created a new set of Variant Records (including a modified product_parent_id value) instead of updating the existing Variants, and also updated the Product record but removed its relationship to the Characteristic ("Packaging"). When I re-load the Characteristic connection into the Product, the connection to the original Variants re-appeared along with the new Variants, but all the new Variant titles were the same as the first one loaded, and no default Variant was selected. When I selected a default on the Variant List, I got a SQL error:
I'll keep on this to see if I found some pattern.
Please Log in or Create an account to join the conversation.
Please check the product_parent_id of you CSV. The column needs to be filled for variant rows in your CSV.
And without the modification I provided above that wouldn't be the case. So you need to do the modification too.
Please Log in or Create an account to join the conversation.
What I'm seeing is that when I import new Variants for existing Main products, the Product records for the variants are created, but the Original Product record has no knowledge of the Characteristic. If I add the Characteristic to the Main Product, all the Variants become linked to the Main Product, all the Variants are listed on the Edit Product Page, but are all marked the default value (though the Code and Price values are correct).
To correct it, I have to open and re-save each Variant, selecting the proper Characteristic value. THEN, everything displays properly. However, if I import the same data again, the correct Variant records remain linked to the Main Product, but lose their Characteristic Value. At the same time, a NEW set of Variants is created with the same problems as the original import (but now with a number appended to Product Codes).
Here is the data I used for one Product and its Variants.
Please Log in or Create an account to join the conversation.
I don't see any column for each characteristic of your shop.
You normally have one column per characteristic in a CSV.
And for the main product row, you have the default value of the characteristic in that column.
And for each variant row, you have the value of the variant for that characteristic in that column.
That's how the system link the product with the variants through the characteristic(s).
On the page www.hikashop.com/support/documentation/73-hikashop-import.html we have an example of import with variants that you can check out.
And if you export the CSV of a product with variants, you should see these additional columns filled for each row.
Please Log in or Create an account to join the conversation.
Early tests are good, including a few new product insertions. I'll keep you informed.
Please Log in or Create an account to join the conversation.
Thank you very much for your help.
Please Log in or Create an account to join the conversation.