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

#   \[SOLVED\] CSV import - problems with variants

##

- **[Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")**
- [![Mainzer's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/splatter_hand.png)](/forum/user/12103-mainzer "View Mainzer's Profile") Topic Author
- [ Offline](/forum/user/12103-mainzer)

Less More

- Posts: 18
- Thank you received: 0
-
-

13 years 10 months ago -  13 years 10 months ago [\#82932](#82932) by [Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")  *[\[SOLVED\] CSV import - problems with variants](/forum/4-how-to/76936-solved-csv-import-problems-with-variants#82932 "Hello,  Can anyone help me with this, I don't know what I'm doing wrong. I already read all post related to CSV on this forum but I don't get it.  First I exported csv file from hikashop and start adding products and variants. I use LibreOffice Calc for that. When I made an import it kind of scrambled some variants and prices were not defined. At import is always the message that I have invalid product codes.  After several tries I decided to clean hikashop database and start over again. So I deleted all the products and variants from hikashop backend. In phpmyadmin I deleted the all the rows and Empty the tables (TRUNCATE) of: hikashop&#95;variant, hikashop&#95;product&#95;category, hikashop&#95;product and hikashop&#95;price.  After this I import a new created csv file (please see atached file), with some products and all its variants with prices. I get this notification: &quot;192 products found, 136 products imported, 14 invalid product codes and 42 already existing products.  Why do I have invalid product codes and already existing products? Did I not deleted them all? What do I have to delete more?  Next I export a new csv file (see attachement) and realized it only imports all main products and only the variants of the last main product in the list. Also some cells of the variants have duplicate values:  If you need more info just ask. I'm trying this for 2 days now. Any help is very appreciated.  regards, Mainzer  UPDATE: The &quot;14 invalid product codes&quot; is solved, I found the error. All the other problems remain.")* was created by *[Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")*

Hello,

Can anyone help me with this, I don't know what I'm doing wrong. I already read all post related to CSV on this forum but I don't get it.

First I exported csv file from hikashop and start adding products and variants. I use LibreOffice Calc for that. When I made an import it kind of scrambled some variants and prices were not defined. At import is always the message that I have invalid product codes.

After several tries I decided to clean hikashop database and start over again. So I deleted all the products and variants from hikashop backend. In phpmyadmin I deleted the all the rows and Empty the tables (TRUNCATE) of: hikashop_variant, hikashop_product_category, hikashop_product and hikashop_price.

After this I import a new created csv file (please see atached file), with some products and all its variants with prices. I get this notification: "192 products found, 136 products imported, 14 invalid product codes and 42 already existing products.

Why do I have invalid product codes and already existing products? Did I not deleted them all? What do I have to delete more?

Next I export a new csv file (see attachement) and realized it only imports all main products and only the variants of the last main product in the list. Also some cells of the variants have duplicate values:

image missing http://img221.imageshack.us/img221/8009/capturadeecrade20121220.png

If you need more info just ask. I'm trying this for 2 days now. Any help is very appreciated.

regards,
Mainzer

UPDATE: The "14 invalid product codes" is solved, I found the error. All the other problems remain.

Last edit: 13 years 10 months ago by [Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2OTM2LXNvbHZlZC1jc3YtaW1wb3J0LXByb2JsZW1zLXdpdGgtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")**
- [![Mainzer's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/splatter_hand.png)](/forum/user/12103-mainzer "View Mainzer's Profile") Topic Author
- [ Offline](/forum/user/12103-mainzer)

Less More

- Posts: 18
- Thank you received: 0
-
-

13 years 10 months ago [\#82995](#82995) by [Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")  Replied by *[Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")* on topic *[CSV import - problems with variants](/forum/4-how-to/76936-solved-csv-import-problems-with-variants#82995 "Hello,  Can anyone help me with this, I don't know what I'm doing wrong. I already read all post related to CSV on this forum but I don't get it.  First I exported csv file from hikashop and start adding products and variants. I use LibreOffice Calc for that. When I made an import it kind of scrambled some variants and prices were not defined. At import is always the message that I have invalid product codes.  After several tries I decided to clean hikashop database and start over again. So I deleted all the products and variants from hikashop backend. In phpmyadmin I deleted the all the rows and Empty the tables (TRUNCATE) of: hikashop&#95;variant, hikashop&#95;product&#95;category, hikashop&#95;product and hikashop&#95;price.  After this I import a new created csv file (please see atached file), with some products and all its variants with prices. I get this notification: &quot;192 products found, 136 products imported, 14 invalid product codes and 42 already existing products.  Why do I have invalid product codes and already existing products? Did I not deleted them all? What do I have to delete more?  Next I export a new csv file (see attachement) and realized it only imports all main products and only the variants of the last main product in the list. Also some cells of the variants have duplicate values:  If you need more info just ask. I'm trying this for 2 days now. Any help is very appreciated.  regards, Mainzer  UPDATE: The &quot;14 invalid product codes&quot; is solved, I found the error. All the other problems remain.")*

Sorry bordering you.

At last I figured it out. ![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

I gave every variant an exclusive product_name and it worked. (I thought that the name of the variants were irrelevant and that hikashop would automaticly create different prodruct_code for each variant)

But this is very time consuming. I have to import tousands of products, with 12 variants each :ohmy:
Does leaving it blank work?

Is there a faster way to do this?

Thank you,
Mainzer

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2OTM2LXNvbHZlZC1jc3YtaW1wb3J0LXByb2JsZW1zLXdpdGgtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14279
-
-

13 years 10 months ago [\#82996](#82996) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[CSV import - problems with variants](/forum/4-how-to/76936-solved-csv-import-problems-with-variants#82996 "Hello,  Can anyone help me with this, I don't know what I'm doing wrong. I already read all post related to CSV on this forum but I don't get it.  First I exported csv file from hikashop and start adding products and variants. I use LibreOffice Calc for that. When I made an import it kind of scrambled some variants and prices were not defined. At import is always the message that I have invalid product codes.  After several tries I decided to clean hikashop database and start over again. So I deleted all the products and variants from hikashop backend. In phpmyadmin I deleted the all the rows and Empty the tables (TRUNCATE) of: hikashop&#95;variant, hikashop&#95;product&#95;category, hikashop&#95;product and hikashop&#95;price.  After this I import a new created csv file (please see atached file), with some products and all its variants with prices. I get this notification: &quot;192 products found, 136 products imported, 14 invalid product codes and 42 already existing products.  Why do I have invalid product codes and already existing products? Did I not deleted them all? What do I have to delete more?  Next I export a new csv file (see attachement) and realized it only imports all main products and only the variants of the last main product in the list. Also some cells of the variants have duplicate values:  If you need more info just ask. I'm trying this for 2 days now. Any help is very appreciated.  regards, Mainzer  UPDATE: The &quot;14 invalid product codes&quot; is solved, I found the error. All the other problems remain.")*

Hi,

Try to remove the product_id column and import again after a fresh truncate of the table. The rest looks ok in your CSV.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2OTM2LXNvbHZlZC1jc3YtaW1wb3J0LXByb2JsZW1zLXdpdGgtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")**
- [![Mainzer's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/splatter_hand.png)](/forum/user/12103-mainzer "View Mainzer's Profile") Topic Author
- [ Offline](/forum/user/12103-mainzer)

Less More

- Posts: 18
- Thank you received: 0
-
-

13 years 10 months ago -  13 years 10 months ago [\#83004](#83004) by [Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")  Replied by *[Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")* on topic *[CSV import - problems with variants](/forum/4-how-to/76936-solved-csv-import-problems-with-variants#83004 "Hello,  Can anyone help me with this, I don't know what I'm doing wrong. I already read all post related to CSV on this forum but I don't get it.  First I exported csv file from hikashop and start adding products and variants. I use LibreOffice Calc for that. When I made an import it kind of scrambled some variants and prices were not defined. At import is always the message that I have invalid product codes.  After several tries I decided to clean hikashop database and start over again. So I deleted all the products and variants from hikashop backend. In phpmyadmin I deleted the all the rows and Empty the tables (TRUNCATE) of: hikashop&#95;variant, hikashop&#95;product&#95;category, hikashop&#95;product and hikashop&#95;price.  After this I import a new created csv file (please see atached file), with some products and all its variants with prices. I get this notification: &quot;192 products found, 136 products imported, 14 invalid product codes and 42 already existing products.  Why do I have invalid product codes and already existing products? Did I not deleted them all? What do I have to delete more?  Next I export a new csv file (see attachement) and realized it only imports all main products and only the variants of the last main product in the list. Also some cells of the variants have duplicate values:  If you need more info just ask. I'm trying this for 2 days now. Any help is very appreciated.  regards, Mainzer  UPDATE: The &quot;14 invalid product codes&quot; is solved, I found the error. All the other problems remain.")*

Hi nicolas,

Like I said in my 2nd post it only worked renaming each variant with an exclusive product name. I didn't need to eliminate the column product_id, only its content.

Isn't there a "automatic" way to do this?

Thanks

Last edit: 13 years 10 months ago by [Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2OTM2LXNvbHZlZC1jc3YtaW1wb3J0LXByb2JsZW1zLXdpdGgtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14279
-
-

13 years 10 months ago [\#83019](#83019) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[CSV import - problems with variants](/forum/4-how-to/76936-solved-csv-import-problems-with-variants#83019 "Hello,  Can anyone help me with this, I don't know what I'm doing wrong. I already read all post related to CSV on this forum but I don't get it.  First I exported csv file from hikashop and start adding products and variants. I use LibreOffice Calc for that. When I made an import it kind of scrambled some variants and prices were not defined. At import is always the message that I have invalid product codes.  After several tries I decided to clean hikashop database and start over again. So I deleted all the products and variants from hikashop backend. In phpmyadmin I deleted the all the rows and Empty the tables (TRUNCATE) of: hikashop&#95;variant, hikashop&#95;product&#95;category, hikashop&#95;product and hikashop&#95;price.  After this I import a new created csv file (please see atached file), with some products and all its variants with prices. I get this notification: &quot;192 products found, 136 products imported, 14 invalid product codes and 42 already existing products.  Why do I have invalid product codes and already existing products? Did I not deleted them all? What do I have to delete more?  Next I export a new csv file (see attachement) and realized it only imports all main products and only the variants of the last main product in the list. Also some cells of the variants have duplicate values:  If you need more info just ask. I'm trying this for 2 days now. Any help is very appreciated.  regards, Mainzer  UPDATE: The &quot;14 invalid product codes&quot; is solved, I found the error. All the other problems remain.")*

Hi,

You need to fill the product_code column for the variants, otherwise, the system will use the product_name as a product_code and if you have several variants with the same product_name, you get the behavior that you have. The product_name can be the same, that's not an issue, but the product_code has to be unique.
If you don't care about the value of the product_code for variants then that's easy to fill up in excel. just enter a number in the first one and have excel generate all the other ones.

The following user(s) said Thank You: [Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2OTM2LXNvbHZlZC1jc3YtaW1wb3J0LXByb2JsZW1zLXdpdGgtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")**
- [![Mainzer's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/splatter_hand.png)](/forum/user/12103-mainzer "View Mainzer's Profile") Topic Author
- [ Offline](/forum/user/12103-mainzer)

Less More

- Posts: 18
- Thank you received: 0
-
-

13 years 10 months ago [\#83034](#83034) by [Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")  Replied by *[Mainzer](/forum/user/12103-mainzer "View Mainzer's Profile")* on topic *[CSV import - problems with variants](/forum/4-how-to/76936-solved-csv-import-problems-with-variants#83034 "Hello,  Can anyone help me with this, I don't know what I'm doing wrong. I already read all post related to CSV on this forum but I don't get it.  First I exported csv file from hikashop and start adding products and variants. I use LibreOffice Calc for that. When I made an import it kind of scrambled some variants and prices were not defined. At import is always the message that I have invalid product codes.  After several tries I decided to clean hikashop database and start over again. So I deleted all the products and variants from hikashop backend. In phpmyadmin I deleted the all the rows and Empty the tables (TRUNCATE) of: hikashop&#95;variant, hikashop&#95;product&#95;category, hikashop&#95;product and hikashop&#95;price.  After this I import a new created csv file (please see atached file), with some products and all its variants with prices. I get this notification: &quot;192 products found, 136 products imported, 14 invalid product codes and 42 already existing products.  Why do I have invalid product codes and already existing products? Did I not deleted them all? What do I have to delete more?  Next I export a new csv file (see attachement) and realized it only imports all main products and only the variants of the last main product in the list. Also some cells of the variants have duplicate values:  If you need more info just ask. I'm trying this for 2 days now. Any help is very appreciated.  regards, Mainzer  UPDATE: The &quot;14 invalid product codes&quot; is solved, I found the error. All the other problems remain.")*

Thank you nicolas,

that was exactly what I needed to know ![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc2OTM2LXNvbHZlZC1jc3YtaW1wb3J0LXByb2JsZW1zLXdpdGgtdmFyaWFudHM/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.358 seconds

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

[](#top)
