2

I would like to import a product csv into Magento 2 through the standard admin UI. The category name contains commas Default Category/Grocery/Snacks/Fruit, Nuts, Seeds.

The (abbreviated) csv looks like this: sku,attribute_set_code,product_type,categories,product_websites T1L-90573,Default,simple,"Default Category/Grocery/Snacks/Fruit, Nuts, Seeds",base

The result is that the product is imported into a new category Default Category/Grocery/Snacks/Fruit and two other new categories are being created for Nuts and Seeds.

I tried selecting the Fields enclosure but this doesn't work. I've tried escaping the commas with backslashes, double quotes and single quotes.

I tried importing the product and setting the category manually through the admin UI and exporting the product, but the category in the exported csv appears as it did in my original csv. When I delete the product and try to re-import the newly exported csv, I have the same problem as described above.

I've tried changing the Multiple value separator after seeing this question which concerns how to escape commas in the additional_info field but that doesn't seem to effect how other fields are handled during import.

2

To get the import to work I've resorted to exporting the csv using pipe (| ) separated fields in OpenOffice for Mac. You will need to change the Field separator from comma to pipe on the import page in Magento 2.

0

I have used the html character code and that worked just fine: html character codes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.