Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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

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