evoWeb / store_finder

Store finder extension for TYPO3
GNU General Public License v2.0
2 stars 9 forks source link

How to import data correctly #37

Closed stephangrass closed 1 year ago

stephangrass commented 1 year ago

I'm trying to import data with this:

storefinder:import '1:/user_upload/locations.xlsx' 203 1 '{A:"import_id",B:"name",C:"address",D:"city",E:"zipcode",F:"country",G:"phone",H:"email",I:"url",J:"icon"}' '' ''

However, only empty data records are imported. And also more than are available in the Excel file. What am I doing wrong?

Thanks for a tip Stephan

stephangrass commented 1 year ago

Ok, if I use

storefinder:import '1:/user_upload/locations.xlsx' 203 1 '{"A":"import_id","B":"name","C":"address","D":"city","E":"zipcode","F":"country","G":"phone","H":"email","I":"url","J":"icon"}' '' ''

I will get the error:

Uncaught TYPO3 Exception Cannot use object of type stdClass as array
thrown in file /homepages/17/d452800978/htdocs/websites/typo3/www/typo3conf/ext/store_finder/Classes/Command/ImportLocationsCommand.php
in line 253
stephangrass commented 1 year ago

When I edit ImportLocationsCommand

    private $columnMap = [
        'A' => 'import_id',
        'B' => 'name',
        'C' => 'address',
        'D' => 'city',
        'E' => 'zipcode',
        'F' => 'country',
        'G' => 'phone',
        'H' => 'email',
        'I' => 'url',
        'J' => 'icon',
    ];

the import will work. But not the country-transformation (DE, AT, LU, ...)

garbast commented 1 year ago

The importer was improved and the changes are documented. Please test if the console call without php changes work for you now. After that testing i would release the extension.

The countries need to be replaced in the excel sheet, there is nothing that could be done with reasonable efford. If you like to sponsore an automatic mapping, atleast three hours are needed for that.

stephangrass commented 1 year ago

Thanks! This will work.