techdivision / import-product

This library provides the basic function for the Magento 2 product import. This includes the import of simple products, their assignment to web pages and categories as well as the updating of the stock (not MSI) and the dynamic processing of the EAV attributes assigned to the product.
https://pacemaker.techdivision.com
MIT License
6 stars 12 forks source link

product_type and attribute_set_code need to be provided, docs wrong? #156

Closed amenk closed 4 years ago

amenk commented 4 years ago

On https://docs.m2if.com/38/file-structure/product-import/scopes it looks like the two attributes product_type and attribute_set_code are not necessary for the store view scope lines.

product-import_20200629_1.zip

Still this file is not working:

sku,store_view_code,product_type,attribute_set_code,name
12345,,simple,Default,some global name
12345,shop_de_de,,,name de
12345,shop_at_de,,,name at
12345,shop_gb_en,,,name gb
12345,shop_it_it,,,name it

Validation error

+-------------------------------+------+--------------------+-------------------------------------------------------------------------------------------------------------------------------+
| File                          | Line | Column             | Error                                                                                                                         |
+-------------------------------+------+--------------------+-------------------------------------------------------------------------------------------------------------------------------+
| product-import_20200629_1.csv | 3    | product_type       | Found invalid value "" for column "product_type" (must be one of: "simple, virtual, configurable, bundle, grouped, giftcard") |
| product-import_20200629_1.csv | 4    | attribute_set_code | Found invalid value "" for column "attribute_set_code" (must be one of: "Default")                                            |
| product-import_20200629_1.csv | 5    | product_type       | Found invalid value "" for column "product_type" (must be one of: "simple, virtual, configurable, bundle, grouped, giftcard") |
| product-import_20200629_1.csv | 6    | attribute_set_code | Found invalid value "" for column "attribute_set_code" (must be one of: "Default")                                            |
| product-import_20200629_1.csv | 7    | product_type       | Found invalid value "" for column "product_type" (must be one of: "simple, virtual, configurable, bundle, grouped, giftcard") |
| product-import_20200629_1.csv | 8    | attribute_set_code | Found invalid value "" for column "attribute_set_code" (must be one of: "Default")                                            |
| product-import_20200629_1.csv | 9    | product_type       | Found invalid value "" for column "product_type" (must be one of: "simple, virtual, configurable, bundle, grouped, giftcard") |
| product-import_20200629_1.csv | 10   | attribute_set_code | Found invalid value "" for column "attribute_set_code" (must be one of: "Default")                                            |
+-------------------------------+------+--------------------+-------------------------------------------------------------------------------------------------------------------------------+

When filling those fields, it is working.

wagnert commented 4 years ago

@amenk The column attribute_set_code is mandatory, also on store view level. The validation for column product_type will be fixed with the next release.

amenk commented 4 years ago

Great, thanks for checking. We should update the sample in the docs as well. There are misleading here :)

wagnert commented 4 years ago

@amenk I already did update the documentation, hope everything get's clear now :)

wagnert commented 4 years ago

Hi @amenk, up from version 3.8.24 the column product_type is NOT mandatory on store view but on main row level. The column attribute_set_code is mandatory in all rows, as it is used to load the EAV attributes that has to be updated. Probably we'll find a better solution in future releases :)