[Skip to main content](#vessel-content)

#   Importing Attribute Products breaks the Codes

##

- **[rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")**
- [![rodfarrell's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5859-rodfarrell "View rodfarrell's Profile") Topic Author
- [ Offline](/forum/user/5859-rodfarrell)

Less More

- Posts: 259
- Thank you received: 22
-
-

12 years 3 months ago -  12 years 3 months ago [\#168439](#168439) by [rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")  *[Importing Attribute Products breaks the Codes](/forum/37-import-export-csv-xls/870534-importing-attribute-products-breaks-the-codes#168439 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5.24  I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under &quot;manage attributes&quot; I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.  On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product&#95;id  On import I have set &quot;Update Products Information.....&quot; to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.")* was created by *[rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")*

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 2.5.24

I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under "manage attributes" I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.

On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product_id

On import I have set "Update Products Information....." to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.

Last edit: 12 years 3 months ago by [rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzA1MzQtaW1wb3J0aW5nLWF0dHJpYnV0ZS1wcm9kdWN0cy1icmVha3MtdGhlLWNvZGVzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

12 years 3 months ago [\#168548](#168548) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Importing Attribute Products breaks the Codes](/forum/37-import-export-csv-xls/870534-importing-attribute-products-breaks-the-codes#168548 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5.24  I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under &quot;manage attributes&quot; I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.  On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product&#95;id  On import I have set &quot;Update Products Information.....&quot; to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.")*

In your import file, remove the column product_id and in the product_parent_id column of the variants enter the product_code of the parent product of the variants and it should then work properly.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzA1MzQtaW1wb3J0aW5nLWF0dHJpYnV0ZS1wcm9kdWN0cy1icmVha3MtdGhlLWNvZGVzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")**
- [![rodfarrell's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5859-rodfarrell "View rodfarrell's Profile") Topic Author
- [ Offline](/forum/user/5859-rodfarrell)

Less More

- Posts: 259
- Thank you received: 22
-
-

12 years 3 months ago [\#168581](#168581) by [rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")  Replied by *[rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")* on topic *[Importing Attribute Products breaks the Codes](/forum/37-import-export-csv-xls/870534-importing-attribute-products-breaks-the-codes#168581 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5.24  I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under &quot;manage attributes&quot; I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.  On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product&#95;id  On import I have set &quot;Update Products Information.....&quot; to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.")*

That successfully imports the variants but it creates new product codes for them instead of using the ones we are importing and it doesn't import the rest of the data such as images and prices.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzA1MzQtaW1wb3J0aW5nLWF0dHJpYnV0ZS1wcm9kdWN0cy1icmVha3MtdGhlLWNvZGVzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 3 months ago [\#168627](#168627) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Importing Attribute Products breaks the Codes](/forum/37-import-export-csv-xls/870534-importing-attribute-products-breaks-the-codes#168627 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5.24  I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under &quot;manage attributes&quot; I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.  On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product&#95;id  On import I have set &quot;Update Products Information.....&quot; to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.")*

Hi,

Would it be possible to have the latest version of your CSV in order to check it ?

Did you check the section "Importing products with variants" in the import documentation ?
[ www.hikashop.com/support/documentation/i...hikashop-import.html](https://www.hikashop.com/support/documentation/integrated-documentation/20-hikashop/tutorials/73-hikashop-import.html)
Maybe it can provide you some help too.

Thanks,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzA1MzQtaW1wb3J0aW5nLWF0dHJpYnV0ZS1wcm9kdWN0cy1icmVha3MtdGhlLWNvZGVzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")**
- [![rodfarrell's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5859-rodfarrell "View rodfarrell's Profile") Topic Author
- [ Offline](/forum/user/5859-rodfarrell)

Less More

- Posts: 259
- Thank you received: 22
-
-

12 years 3 months ago [\#168685](#168685) by [rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")  Replied by *[rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")* on topic *[Importing Attribute Products breaks the Codes](/forum/37-import-export-csv-xls/870534-importing-attribute-products-breaks-the-codes#168685 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5.24  I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under &quot;manage attributes&quot; I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.  On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product&#95;id  On import I have set &quot;Update Products Information.....&quot; to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.")*

Thanks Jerome, yes i have read the very limited import documentation a number of times but it sheds no light on why it is not working. Attached is the latest csv file. The variant product codes are being replaced with the generic codes and none of the content from the other columns is being imported.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzA1MzQtaW1wb3J0aW5nLWF0dHJpYnV0ZS1wcm9kdWN0cy1icmVha3MtdGhlLWNvZGVzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

12 years 3 months ago [\#168690](#168690) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Importing Attribute Products breaks the Codes](/forum/37-import-export-csv-xls/870534-importing-attribute-products-breaks-the-codes#168690 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5.24  I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under &quot;manage attributes&quot; I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.  On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product&#95;id  On import I have set &quot;Update Products Information.....&quot; to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.")*

In your variants, you use "Sports Bottle" in the product_parent_id and in your product, you use "Sports_Bottle" in the product_code.
Please use the same text (with the _) and it should work better. The rest of the CSV looks fine.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzA1MzQtaW1wb3J0aW5nLWF0dHJpYnV0ZS1wcm9kdWN0cy1icmVha3MtdGhlLWNvZGVzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")**
- [![rodfarrell's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5859-rodfarrell "View rodfarrell's Profile") Topic Author
- [ Offline](/forum/user/5859-rodfarrell)

Less More

- Posts: 259
- Thank you received: 22
-
-

12 years 3 months ago [\#168744](#168744) by [rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")  Replied by *[rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")* on topic *[Importing Attribute Products breaks the Codes](/forum/37-import-export-csv-xls/870534-importing-attribute-products-breaks-the-codes#168744 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5.24  I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under &quot;manage attributes&quot; I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.  On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product&#95;id  On import I have set &quot;Update Products Information.....&quot; to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.")*

Does that mean we can't use an actual product code (sku) but only the generic code Hikashop generates? Why is the product code field allowed to be edited if that is the case?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzA1MzQtaW1wb3J0aW5nLWF0dHJpYnV0ZS1wcm9kdWN0cy1icmVha3MtdGhlLWNvZGVzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 3 months ago [\#168748](#168748) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Importing Attribute Products breaks the Codes](/forum/37-import-export-csv-xls/870534-importing-attribute-products-breaks-the-codes#168748 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5.24  I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under &quot;manage attributes&quot; I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.  On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product&#95;id  On import I have set &quot;Update Products Information.....&quot; to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.")*

Hi,

That's not what Nicolas told you.

He told you that you use a product_code but in your variant, you said that the product' parent is "another" product because the product_code you put is not the right one.
Just use the same value for the product_code and the product_parent_id in order to have some consistency.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzA1MzQtaW1wb3J0aW5nLWF0dHJpYnV0ZS1wcm9kdWN0cy1icmVha3MtdGhlLWNvZGVzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")**
- [![rodfarrell's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5859-rodfarrell "View rodfarrell's Profile") Topic Author
- [ Offline](/forum/user/5859-rodfarrell)

Less More

- Posts: 259
- Thank you received: 22
-
-

12 years 3 months ago [\#168802](#168802) by [rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")  Replied by *[rodfarrell](/forum/user/5859-rodfarrell "View rodfarrell's Profile")* on topic *[Importing Attribute Products breaks the Codes](/forum/37-import-export-csv-xls/870534-importing-attribute-products-breaks-the-codes#168802 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5.24  I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under &quot;manage attributes&quot; I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.  On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product&#95;id  On import I have set &quot;Update Products Information.....&quot; to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.")*

Ahhhhh, sorry my mistake. Its a bit counter intuitive having a column called parent_id when it is actually the parent product code, not the id. I panicked when I thought I would have to recreate hundreds of variant products and use a custom field for product sku's when we have already written an SAP integration and a TrueERP integration using the product code field. Time for a lie down. :woohoo:

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzA1MzQtaW1wb3J0aW5nLWF0dHJpYnV0ZS1wcm9kdWN0cy1icmVha3MtdGhlLWNvZGVzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 3 months ago [\#168815](#168815) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Importing Attribute Products breaks the Codes](/forum/37-import-export-csv-xls/870534-importing-attribute-products-breaks-the-codes#168815 "-- HikaShop version -- : 2.3.2 -- Joomla version -- : 2.5.24  I'm having some issues around importing products with attributes and product codes. I have created the attribute products and under &quot;manage attributes&quot; I have modified tho codes to match the real life sku for the product. If I then export the product to make any changes (eg. I wanted to change prices in a spreadsheet) when I reimport the csv the attribute products are no longer linked to the parent. This happens even if I don't make any change to the csv.  On further investigation of the database it appears that the original attribute products have been deleted altogether. There are no longer any products with the original product&#95;id  On import I have set &quot;Update Products Information.....&quot; to yes. The message says that 7 products have been updated but the update performed on the attribute products is to delete them.")*

Hi,

The column ask for the an "id" but when you create a new product, you can't know the "id" of the product you will create (because you add a new one, you're not updating an existing product).
That's why, the column also accept a "product_code" which is unique in the database.

When the import see that the "id" is not a number, it will look in the "code" to find the good one.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzA1MzQtaW1wb3J0aW5nLWF0dHJpYnV0ZS1wcm9kdWN0cy1icmVha3MtdGhlLWNvZGVzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.077 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
