importer mapper and example csv

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
obayesshelton
Posts: 21
Joined: 12 Oct 2015, 12:31

importer mapper and example csv

Post by obayesshelton » 31 Oct 2015, 16:31

Hey,

I am using your exaple csv from - https://aimeos.org/docs/Developers/Cont ... s_from_CSV

I am also using the example mappings and this is how it looks in my config

Code: Select all

'common' => array(
            'product' =>  array(
                'import' =>  array(
                    'csv' =>  array(
                        'mapping' => array(
                            'item' => array(
                                0 => 'product.code', // e.g. unique EAN code
                                1 => 'product.label', // UTF-8 encoded text, also used as product name
                                2 => 'product.type', // type of the product, e.g. "default" or "selection"
                                3 => 'product.status', // enabled (1) or disabled (0)
                            ),
                            'text' => array(
                                4 => 'text.type', // e.g. "short" for short description
                                5 => 'text.content', // UTF-8 encoded text
                                6 => 'text.type', // e.g. "long" for long description
                                7 => 'text.content', // UTF-8 encoded text
                            ),
                            'media' => array(
                                8 => 'media.url', // relative URL of the product image on the server
                            ),
                            'price' => array(
                                9 => 'price.quantity', // the quantity the price is valid from (for block pricing)
                                10 => 'price.value', // price with decimals separated by a dot, no thousand separator
                                11 => 'price.taxrate', // tax rate with decimals separated by a dot
                            ),
                            'attribute' => array(
                                12 => 'attribute.type', // e.g. "size", "length", "width", "color", etc.
                                13 => 'attribute.code', // code of an existing attribute, new ones will be created automatically
                            ),
                            'product' => array(
                                14 => 'product.code', // e.g. EAN code of another product
                                15 => 'product.list.type', // e.g. "suggestion" for suggested product
                            ),
                            'property' => array(
                                16 => 'product.property.value', // arbitrary value for the corresponding type
                                17 => 'product.property.type', // e.g. "package-weight"
                            ),
                            'catalog' => array(
                                18 => 'catalog.code', // e.g. Unique category code
                                19 => 'catalog.list.type', // e.g. "promotion" for top seller products
                            ),
                        ),
                    ),
                ),
            ),
        ),
However when I run

Code: Select all

php artisan aimeos:jobs product/import/csv
I get the following error -

Code: Select all

 Invalid product lines in 3/3
any ideas ?

User avatar
aimeos
Administrator
Posts: 3522
Joined: 01 Jan 1970, 00:00

Re: importer mapper and example csv

Post by aimeos » 31 Oct 2015, 17:03

obayesshelton wrote: I am using your exaple csv from - https://aimeos.org/docs/Developers/Cont ... s_from_CSV
I am also using the example mappings and this is how it looks in my config
I get the following error -

Code: Select all

 Invalid product lines in 3/3
The madmin_log table contains more information about the errors that have occurred. You can see all messages in the first tab of the admin interface.

In this case, the example file references a category (root) that doesn't exist. I've uploaded a new file that fixed the error. When importing you will now see 1 of 3 lines fails as long as you don't configure to skip the first line:
https://aimeos.org/docs/Configuration/C ... skip-lines
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply