Product import with variants

  • Posts: 1119
  • Thank you received: 114
6 years 9 months ago #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:

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

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
6 years 9 months ago #287510

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 & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 1119
  • Thank you received: 114
6 years 9 months ago #287569

Hi Jerome,

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

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 or Create an account to join the conversation.

  • Posts: 1119
  • Thank you received: 114
6 years 9 months ago #287578

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: "<span class="item_size">S</span>"

This did the job:

product_code,product_parent_id,color,size,categories
main_product,,Black,<span class="item_size">S</span>,148
first_variant,main_product,Black,<span class="item_size">S</span>,
second_variant,main_product,Black,<span class="item_size">M</span>,

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 or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
6 years 9 months ago #287573

It's the same principle:

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 or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum