Question

I am trying to import product with CSV in Magento2. In first case all attributes are default attributes so import works fine.

Now In second case I have added some custom attribute in my Magento 2.2 and added them to attribute set, and with that attribute set I have created product manually from backend. Now I have exported that product to view the format of CSV file.

In that I found one thing, My all custom attributes were in one column called "additional_attributes".

So my question is while importing products Do I have to add my all custom attributes under "additional_attributes" ?

Or How May I import my custom attributes values?

Was it helpful?

Solution

  1. Upload from the default CSV generated by Magento

Yes you need to fill all your custom attributes into the single column named additional_attributes_code.

Just simply put all your custom attribute in following way into the column with name additional_attributes_code into your imported CSV file.

custom_attribute_code_1="Value_1",custom_attribute_code_2="Value_2",custom_attribute_code_3="Value_3",custom_attribute_code_4="Value_4"

After this simply upload your CSV file.

  1. Upload with some changes into the CSV generated from the Magento

You also can create different columns with the attribute_code of your custom attributes & fill the data into it & upload the file. It will works with it as well.

Note: First upload a single product manually & download the csv file from your admin & do corrections into it only & use only that file for uploading/Updating the products.

I will recommend the First one because as of you will have more no. of attributes & more no of attribute sets you need to insert more no of columns into your CSV file so better would be upload it into a single column it will reduce your time for this data entry stuff as of you are using CSV upload for that intention only.

Hope This will help!

Thank You!

OTHER TIPS

I have made one more test case and tried to upload with the name of attribute in csv. Instead of "additional_attributes" I have directly added name of a column and tried to upload value of a custom attribute and it worked.

So both ways are working. we can specify under "additional_attributes" as well as we can directly give attribute name to upload value of custom attributes.

Yes, you have to add all custom attributes under additional_attributes column.

See below image

enter image description here

I know I am late, but I found a way that is slightly weird way to import configurable products but it works!

  1. Make attribute options before adding product: example; Attri 1, Attri 2, Attri 3, -> make it Required value -> save you don't have to set it in any attribute list.
  2. Make a configurable product and while making the configurations through attribute, add only 1 option. All options should be selectable but dont! Only "Attri 1" in this case. Noww add price and quantity, set it to 1 both, we are gonna change this anyway. Save.
  3. Go back to product with "Attri 1", there is now a Add products manually -> Import your products and automatically bind it to a value you just made:

Add a column and use the same Attribute Code, find this at the options in your made attribute. Overview:

Attribute code: attri_i_made_up Values: Attri 1, Attri 2, Attri 3,

In your import document:

Column name you want products to be connected to: attri_i_made_up Column values:

  • Row 1: Attri 1
  • Row 2: Attri 2
  • Row 3: Attri 3

Additional important stuff:

  • Values in import csv and backend magento should match 100% or its gonna screw you.
  • Open the import document with notepad++ to check field separator.
  • If products don't stay in the configurable product you probably have a mismatch of values.
  • The error message always excludes row 1: Row 23 has some errors -> its row 24 in your csv.
  • Delete products you don't need or if you have a ruined import that added -2 -3 SKU's.

I bet I could have explained this way better but hey I'm in a hurry to import products!

Maybe a little late to the show, but if you are, like me, struggling with custom attributes not being imported (and apparently ignored by magento) make sure, the additional attributes column is not quoted in the csv. If this collides with other fields that have to be quoted in your import, consider to import the additional_attributes separately in a csv-file only consisting of the column "sku" and the column "additional_attributes" with comma-separated attributes within. (use a semicolon as field separator in the csv)

According to:

You also can create different columns with the attribute_code of your custom attributes & fill the data into it & upload the file. It will works with it as well.

I have create my csv file like this:

sku;My_First_multichoice_attribute_code;My_Second_multichoice_attribute_code

product_sku;value-A|value-B;value-X|value-Y|value-Z

; - is a field separator

| - separates values of multichoice_attribute

Every value on both attributes had been successfully imported.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top