Question

How can we import multiple select attribute values using CSV ?

For example SKU "test" has two values for attribute "xyz" - "val1" and "val2".

When I use both value as val1<space><comma><space>val2 , import throws error:

  1. Value for 'xyz' attribute contains incorrect value, see acceptable values on settings specified for Admin rows ....
Était-ce utile?

La solution

You can do this by just add multiple values by any separator and add that separator in Multiple value separator field. like this

val1|val2|val3

check this screenshot. https://prnt.sc/ics5ur

if you still face the issue then un-check Fields enclosure checkbox.

Autres conseils

Magento 2 - We have multiple options for separating your custom attributes like

USING COMMA

attribute_code1 = custom_attribute_value1 , attribute_code2 = custom_attribute_value2 , gon on...

USING VERTICAL BAR

attribute_code1 = custom_attribute_value1 | attribute_code2 = custom_attribute_value2 | gon on...

USING COLON

attribute_code1 = custom_attribute_value1 : attribute_code2 = custom_attribute_value2 : gon on...

We have Multiple value separator option in admin panel, below-attached screenshot for your reference

enter image description here

--- More Description -----

Magento 2 - When you are export product CSV, created product custom attributes comes under "additional_attributes" column in CSV file.

If you have multiple custom attribute, which would be separated by commas in same "additional_attributes" column

additional_attributes column in product csv file

Product 1 : attribute_code1 = custom_attribute_value1 , attribute_code2 = custom_attribute_value2 , gon on...
Product 2 : attribute_code1 = custom_attribute_value1 , attribute_code2 = custom_attribute_value2 , go on...

Finally, you can proceed with normal magento2 import process, you can see respective product attributes value is updated...

Notes : Magento 2 custom attributes value comes under "additional_attributes" column in csv file

I tried like following

in "additional_attributes" I put values like for my custom made multiple select attribute filter_color, filter_color=SILVER | GOLD | BLUE

Also "Fields enclosure" check box is already unchecked.

Also put "|" in "Multiple value separator" while importing.

even then the following error displayed while importing Value for 'filter_color' attribute contains incorrect value, see acceptable values on settings specified for Admin But for the rows which contains values like "filter_color=SILVER" (SINGLE VALUES) it shows correct

Please help me to resolve this.

Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top