Magento 2 – How to Import Product Content for Each Store View

importmagento2multistore

In Magento 1.x you could import different content for each store view by having each store data in new line and empty sku field.
Unfortunately this seems not to work in Magento 2 and I could not find any information about it. The official docs are not very helpful on this matter.

I tried with following CSV:

sku,store_view_code,name
1111,,"Default name"
,et,"Translated name"

This results in error:

Please make sure attribute "sku" is not empty

I also tried to import translations separately, adding store_view_code with appropriate value:

sku,store_view_code,name
1111,et,"Translated name"

This actually did import content to correct store view, but it also deleted default name from database.

I do understand that I could just insert translations to catalog_product_entity_varchar and similar, with some custom script, but isn't there really no official/non-coding way of doing this in Magento 2?

Best Answer

Apparently the solution is pretty simple. Too bad there is no word about it in official docs. My second approach in OP is almost correct, but you have to import all store views together in one import, including default. Separate import will reset field data for all store views and keep only the one's in last import. Difference with 1.x is that sku must be set for each store view. So the correct Magento 2 way should be something like this:

sku,store_view_code,name
1111,,"Default name"
1111,et,"Translated name"
1111,ru,"Another translation"

Note that this CSV will not work as initial import, but only as update of already existing product. You need to add required attributes for initial insert.