Magento 2: Import multiple select attribute values using CSV
-
30-12-2020 - |
문제
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:
- Value for 'xyz' attribute contains incorrect value, see acceptable values on settings specified for Admin rows ....
해결책
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.
다른 팁
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
--- 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.