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

#   Product import with variants

##

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile") Topic Author
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

8 years 9 months ago [\#287508](#287508) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  *[Product import with variants](/forum/37-import-export-csv-xls/893739-product-import-with-variants#287508 "Hi,  I am not sure is this a bug or i am doing something wrong. We are looking to import products via csv improved and had some issues. So to see how it is working by default with hikashop import system we created csv file like this:  Everything imports fine but the issue is that both variants are preselected as default in back end product variant edition page. Also on front end product has no variants. So whats the issue?  Kind Regards")* was created by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")*

Hi,

I am not sure is this a bug or i am doing something wrong. We are looking to import products via csv improved and had some issues. So to see how it is working by default with hikashop import system we created csv file like this:
Code:

product_code,product_parent_id,color,categories main_product,,Black,148 first_variant,main_product,Black, second_variant,main_product,Black,

Everything imports fine but the issue is that both variants are preselected as default in back end product variant edition page. Also on front end product has no variants. So whats the issue?

Kind Regards

- [ ![Untitled&#95;2018-02-08.png](/forum/attachment/42515) ](/forum/attachment/42515 "...2018-02-08.png") [ ](/forum/attachment/42515?download=1 "...2018-02-08.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTM3MzktcHJvZHVjdC1pbXBvcnQtd2l0aC12YXJpYW50cz90bXBsPW1hcmtkb3du) 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)
-

8 years 9 months ago [\#287510](#287510) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Product import with variants](/forum/37-import-export-csv-xls/893739-product-import-with-variants#287510 "Hi,  I am not sure is this a bug or i am doing something wrong. We are looking to import products via csv improved and had some issues. So to see how it is working by default with hikashop import system we created csv file like this:  Everything imports fine but the issue is that both variants are preselected as default in back end product variant edition page. Also on front end product has no variants. So whats the issue?  Kind Regards")*

Hello,

Both of your variants are using the same characteristic value ; so I'm afraid that your content is incorrect and the issue is logical.
Afterwards, you need to check that these characteristic values are correct and exist in your store ; please note that the case is important.

Regards,

---

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

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

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile") Topic Author
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

8 years 9 months ago [\#287569](#287569) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  Replied by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")* on topic *[Product import with variants](/forum/37-import-export-csv-xls/893739-product-import-with-variants#287569 "Hi,  I am not sure is this a bug or i am doing something wrong. We are looking to import products via csv improved and had some issues. So to see how it is working by default with hikashop import system we created csv file like this:  Everything imports fine but the issue is that both variants are preselected as default in back end product variant edition page. Also on front end product has no variants. So whats the issue?  Kind Regards")*

Hi Jerome,

I see your point and modified csv to look like this:
Code:

product_code,product_parent_id,color,categories main_product,,Black,148 first_variant,main_product,Black, second_variant,main_product,White,

It works fine. 2 Variants are added and preselected is Black.

But what if I need to import 3 variants which has same color with different sizes? How csv should look? Could you give example please?

As example I have BLACK dress in 3 sizes S, M, L

Kind Regards

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

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile") Topic Author
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

8 years 9 months ago [\#287578](#287578) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  Replied by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")* on topic *[Product import with variants](/forum/37-import-export-csv-xls/893739-product-import-with-variants#287578 "Hi,  I am not sure is this a bug or i am doing something wrong. We are looking to import products via csv improved and had some issues. So to see how it is working by default with hikashop import system we created csv file like this:  Everything imports fine but the issue is that both variants are preselected as default in back end product variant edition page. Also on front end product has no variants. So whats the issue?  Kind Regards")*

Update. So found what was giving issue.

The size variant was different. For customization purpose we had to use span attribute inside variant like this: "&lt;span class="item_size"&gt;S&lt;/span&gt;"

This did the job:
Code:

product_code,product_parent_id,color,size,categories main_product,,Black,&lt;span class="item_size"&gt;S&lt;/span&gt;,148 first_variant,main_product,Black,&lt;span class="item_size"&gt;S&lt;/span&gt;, second_variant,main_product,Black,&lt;span class="item_size"&gt;M&lt;/span&gt;,

So question. Could hikashop improve system and add attribute with unique class inside label for each variant? As for now each variant is inside label after input. And there is no way to apply css for variant which is after checked input. So extra class/attribute is needed.

Kind Regards

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTM3MzktcHJvZHVjdC1pbXBvcnQtd2l0aC12YXJpYW50cz90bXBsPW1hcmtkb3du) 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
-
-

8 years 9 months ago [\#287573](#287573) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product import with variants](/forum/37-import-export-csv-xls/893739-product-import-with-variants#287573 "Hi,  I am not sure is this a bug or i am doing something wrong. We are looking to import products via csv improved and had some issues. So to see how it is working by default with hikashop import system we created csv file like this:  Everything imports fine but the issue is that both variants are preselected as default in back end product variant edition page. Also on front end product has no variants. So whats the issue?  Kind Regards")*

It's the same principle: Code:

product_code,product_parent_id,color,size,categories main_product,,Black,S,148 first_variant,main_product,Black,S, second_variant,main_product,White,S, third_variant,main_product,Black,M, fourth_variant,main_product,White,M, fifth_variant,main_product,Black,L, sixth_variant,main_product,White,L,

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTM3MzktcHJvZHVjdC1pbXBvcnQtd2l0aC12YXJpYW50cz90bXBsPW1hcmtkb3du) 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.082 seconds

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