product import job not running

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
whatdaro
Posts: 42
Joined: 19 May 2021, 17:48

product import job not running

Post by whatdaro » 16 Nov 2021, 18:52

Aimeos : 21.10.2
OS: Linux

running from shell: php artisan aimeos:jobs "admin/cache admin/log catalog/import/csv order/cleanup/unpaid product/import/csv product/bought index/rebuild index/optimize product/export/sitemap subscription/process/begin subscription/process/renew subscription/process/end"

This works fine for order email jobs, but the product/import/csv does not work.

I'm using the example from the documentation
added to the shop.php file


'controller' => [
'jobs'=> [
'product' => [
'import' => [
'csv' => [
'backup' => './storage/imported/import.zip'
],
[
'location' => './storage/csv_import/products-import-example.csv',
'skip-lines' => 1,
'mapping' =>
[
'item' => [
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' => [
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
],
....

The csv file is the one from the example.

There are no logs generated and no errors, I'm assuming I missed something or something is not set up properly.

User avatar
whatdaro
Posts: 42
Joined: 19 May 2021, 17:48

Re: product import job not running

Post by whatdaro » 16 Nov 2021, 20:40

I've worked out that my format of the array in shop.php was not structured properly.

I've fixed that, but now the products get updated but the image is not getting added.
I've tried multiple ways to enter the file name. could you please let me know what is the exact format required for the file path to work, also there are no errors for this so don't know where its going wrong, thanks.

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

Re: product import job not running

Post by aimeos » 17 Nov 2021, 10:05

The image URLs in the CSV file must be relative to the ./public/aimeos/ directory of your Laravel installation and the images need to be stored there or in a sub-directory thereof.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply