Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
7551 Lượt xem

I have a list of attributes per product template.

What would be the structure of a csv file to create a product with variants. 

I just need the name, type, ean (per variant) and 1 attribute (color). I dont understand the structure of a product. When I export a template or a list of variants there is no field with attribute value per variant instead it is all values of a template in every row.

Ảnh đại diện
Huỷ bỏ

Hi, did you get feedback on this question? Thanks

Tác giả Câu trả lời hay nhất

You need more than 1 step.

First I imported the attributes with the corresponding values

This csv would import an attribute 'color' with 2 colors and there hex code. Name and type only in the first row.

name,value_ids/name,value_ids/color,type

color,red,#123456,Color

,blue,#123457,

Now you can create a product with variants

name,product_variant_ids/attribute_line_ids/attribute_id,product_variant_ids/attribute_line_ids/value_ids

"Tshirt","color","red,blue"

If you want to add for example an EAN to the variants you would have to export the variants now, add the EAN and reimport.

Ảnh đại diện
Huỷ bỏ

Thanks af :-)