instride-ch / pimcore-data-definitions

Data Definitions Plugin for Pimcore
Other
77 stars 58 forks source link

Key set #57

Closed gasquetnico closed 6 years ago

gasquetnico commented 6 years ago

Hi,

There is an error with the last update.

Not Key set, please check your import-data in /var/www/pimcore/vendor/w-vision/import-definitions/src/ImportDefinitionsBundle/Importer/Importer.php:416

I don't need to set a Key

How to fix this.

Thanks

dpfaffenbauer commented 6 years ago

You need to set a object-key thats a pimcore requirements.

gasquetnico commented 6 years ago

Hi,

sorry to reopen this, but I think the Key is not working properly, unless I'm doing something wrong.

my Key set is: %getText(Item_Name);

I have 3 columns in the CSV file the first one in the Header, so I should have two objects but instead I have 5 empty objects created.

dpfaffenbauer commented 6 years ago

thats definitely wrong, %getText doesn't exist: https://pimcore.com/docs/5.x/Development_Documentation/Development_Tools_and_Details/Placeholders/Text_Placeholder.html

gasquetnico commented 6 years ago

Sorry, my knowledge is limited. Whatever I do, I end up with 5 empty articles

That strange because that was working before %Text(Item_Name);

dpfaffenbauer commented 6 years ago

Can you show me your exact confifguration plus your input file, I'll try that as well.

gasquetnico commented 6 years ago

I have exported the definition plus the CSV file.

Thanks for you time.

dpfaffenbauer commented 6 years ago

found the issue, your configuration is a bit off. You configured comma as a divider, but your CSV uses a semicolon.

dpfaffenbauer commented 6 years ago

BTW: I also implemented a import-definitions extension to be more compatible with CoreShop. Meaning: CoreShop handles prices as integer and float values need to be converted to integers, as well as the storePrice expects either an array with all prices for all stores or a integer value and a store parameter. The configuration for that should look like that:

1 => [
                "fromColumn" => "SalesPrice",
                "toColumn" => "storePrice",
                "primaryIdentifier" => FALSE,
                "setter" => "coreshop_store_price",
                "interpreter" => "coreshop_price",
                "interpreterConfig" => [
                    "isFloat" => TRUE
                ],
                "setterConfig" => [
                    "store" => 1
                ]
            ],
gasquetnico commented 6 years ago

Thank you very much for everything