How to configure and adapt Aimeos based shops as developer
Forum rules: Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#4658 by Innonic
29 Sep 2017, 12:56
Need your help again.

I searched everywhere but I'm not able to make the CSV import work.

I took the standard config provided on https://aimeos.org/docs/Developers/Controller/Import_products_from_CSV#Default_mapping together with the provided CSV file.

I created the Scheduler task with this TS config:

Code: Select allplugin.tx_aimeos {
settings {
controller.jobs.product.import.csv {
location = fileadmin/import/
mapping {
item {
0 = product.code
1 = product.label
2 = product.type
3 = product.status
}
text {
4 = text.type
5 = text.content
6 = text.type
7 = text.content
}
media {
8 = media.url
}
price {
9 = price.quantity
10 = price.value
11 = price.taxrate
}
attribute {
12 = attribute.type
13 = attribute.code
}
product {
14 = product.code
15 = product.lists.type
}
property {
16 = product.property.value
17 = product.property.type
}
catalog {
18 = catalog.code
19 = catalog.lists.type
}
}
}
}
}


After this job I run catalog index update job and clear the frontend caches.

After the job run there's nothing. And there are no error logs or logs at all about this job, neither in the madmin_log table nor in Overview tab. There's also no info that the job started or stopped, just nothing. And of course there are no new articles in the other tables.

Do you have a clue what's wrong?

And I got another question: If I have a product with 3 attributes and each attribute has 10 options, let's say 10 different colors, 10 different sizes and 10 different motives (designs). Do I really have to create 1.000 articles and one selection article to give the customer these choices? Is there no other way?
This way I will quickly have a million articles in the database which will slow down the performance...
Nevertheless that's why I need the CSV import, I can automatically create a CSV...

Thank you in advance!
#4663 by aimeos
30 Sep 2017, 12:23
Most properly the working directory where the cronjob is exectued isn't the root directory of your TYPO3 installation. Please use an absolute path to:
Code: Select allplugin.tx_aimeos.settings.controller.jobs.product.import.csv.location
#4664 by aimeos
30 Sep 2017, 12:28
If you don't need unique article SKUs and offer all possible variants, you can use product options for each dimension (color, size, etc). The only thing you have to overwrite in an additional Javascript function is to enforce the product options as required.
#4690 by Innonic
02 Oct 2017, 13:57
Thanks for your reply.

aimeos wrote:Most properly the working directory where the cronjob is exectued isn't the root directory of your TYPO3 installation. Please use an absolute path to:
Code: Select allplugin.tx_aimeos.settings.controller.jobs.product.import.csv.location


I did that and now I get at least the following log:

Code: Select all#0 [...]typo3conf/ext/aimeos/Resources/Libraries/aimeos/aimeos-core/lib/mwlib/src/MW/Container/Factory.php(46): Aimeos\MW\Container\Directory->__construct('/typo3_grau_01/...', 'CSV', Array)
#1 [...]typo3conf/ext/aimeos/Resources/Private/Extensions/ai-controller-jobs/controller/jobs/src/Controller/Jobs/Product/Import/Csv/Standard.php(493): Aimeos\MW\Container\Factory::getContainer('/typo3_grau_01/...', 'Directory', 'CSV', Array)
#2 [...]typo3conf/ext/aimeos/Resources/Private/Extensions/ai-controller-jobs/controller/jobs/src/Controller/Jobs/Product/Import/Csv/Standard.php(323): Aimeos\Controller\Jobs\Product\Import\Csv\Standard->getContainer()
#3 [...]typo3conf/ext/aimeos/Classes/Scheduler/Base.php(47): Aimeos\Controller\Jobs\Product\Import\Csv\Standard->run()
#4 [...]typo3conf/ext/aimeos/Classes/Scheduler/Task/Typo6.php(42): Aimeos\Aimeos\Scheduler\Base::execute(Array, Array, Array)
#5 [...]typo3/sysext/scheduler/Classes/Scheduler.php(148): Aimeos\Aimeos\Scheduler\Task\Typo6->execute()
#6 [...]typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php(873): TYPO3\CMS\Scheduler\Scheduler->executeTask(Object(Aimeos\Aimeos\Scheduler\Task\Typo6))
#7 [...]typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php(191): TYPO3\CMS\Scheduler\Controller\SchedulerModuleController->executeTasks()
#8 [...]typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php(137): TYPO3\CMS\Scheduler\Controller\SchedulerModuleController->getModuleContent()
#9 [...]typo3/sysext/scheduler/mod1/index.php(22): TYPO3\CMS\Scheduler\Controller\SchedulerModuleController->main()
#10 [...]typo3/mod.php(32): require('/mnt/webr/e0/15...')
#11 {main}


But I still do not have articles. I hope these log messages tell you more than they tell me. Do you have a clue, what I'm still doing wrong?

Thanks for your patience :)
#4701 by aimeos
04 Oct 2017, 14:37
Please remind that the location configuration needs to be a directory where the CSV files are placed. It seems to configured it to point to the CSV file directly.
#4711 by Innonic
05 Oct 2017, 11:51
I made the path point to a directory and to the file directly. In both cases the result is the same as at the beginning: No logs, no products, nothing...

What else could I try?
#4719 by Innonic
05 Oct 2017, 20:09
After reading through this and other threads again and again I came to the conclusion that it MUST be the path that is wrong. So I checked with my provider and indeed, for the cronjobs I had to use an absolute path I hadn't tried yet.
I'm so sorry for bothering you with that, but I had no clue. The experience is growing and hopefully I won't bother you again with such dumb stuff.

So I got a step further and now I get at least some error messages like:

Code: Select allUnable to import product with code "job_csv_test": No type item for "product/import-test" in "attribute/type" found
Unable to import product with code "job_csv_test2": Executing statement "
         INSERT INTO "mshop_price" (
            "siteid", "typeid", "currencyid", "domain", "label",
            "quantity", "value", "costs", "rebate", "taxrate", "status",
            "mtime", "editor", "ctime"
         ) VALUES (
            1, '3', NULL, 'product', ' 10.00', 1, '10.00', '0.00', '0.00', '20.00', 1, '2017-10-05 22:20:04', 'scheduler', '2017-10-05 22:20:04'
         )
      " failed: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'currencyid' cannot be null


Shouldn't that work with your example file? Maybe I can figure out the problem myself now, but your help would be appreciated.
#4725 by aimeos
06 Oct 2017, 11:03
The example CSV doesn't fit to the current importer requirements any more. It needs at least the currency ID for each price and the non-existing attribute type (import-test) is also invalid. We will update the example CSV so it matches the implementation in version 2017.10.

Thanks for your patience!