Closed Ameeko closed 2 years ago
You need to create the allowed/used attribute types first before you import the products.
Thanks for the reply! In the documentation I found "if an attribute doesn't exist, it will be created automatically" https://aimeos.org/docs/latest/cronjobs/product-csv-import/#attribute Maybe I misunderstood something. I'll try what you suggested. Thanks for the help.
Attributes will be created automatically but not attribute types.
CSV Import cannot import attribute columns
With this mapping, none of the products will be imported:
. . . 'price' => [ 11 => 'price.currencyid', 12 => 'price.quantity', 13 => 'price.value', 14 => 'price.taxrate', ], 'attribute' => [ 15 => 'attribute.code', 16 => 'attribute.type', 17 => 'attribute.code', 18 => 'attribute.type', ], 'property' => [ 19 => 'product.property.value', 20 => 'product.property.type', 21 => 'product.property.value', 22 => 'product.property.type', 23 => 'product.property.value', 24 => 'product.property.type', ], . . .
This error message appears in the log for all products: Unable to import product: Invalid type "Size" (attribute) Unable to import product: Invalid type "Type" (attribute)
With this mapping, all products are imported without error:
. . . 'price' => [ 11 => 'price.currencyid', 12 => 'price.quantity', 13 => 'price.value', 14 => 'price.taxrate', ], 'property' => [ 15 => 'product.property.value', 16 => 'product.property.type', 17 => 'product.property.value', 18 => 'product.property.type', 19 => 'product.property.value', 20 => 'product.property.type', 21 => 'product.property.value', 22 => 'product.property.type', 23 => 'product.property.value', 24 => 'product.property.type',
] . . .
But in this case, columns 15-18 will be properties.
Where's my fault?
15-18 colums data example:
Column15: '48' Column16: 'Size' Column17: 'MTB' Column18: 'Type'
Import command:
php artisan aimeos:jobs product/import/csv default