I am unable to import test products using cronjobs, tried different settings.

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!
ivanessans
Posts: 3
Joined: 29 May 2023, 21:47

I am unable to import test products using cronjobs, tried different settings.

Post by ivanessans » 30 May 2023, 18:38

Hi all!

To import products, I used the instructions at this link: https://aimeos.org/docs/2023.x/cronjobs ... est-import

I also want to display my settings file:

Code: Select all

	....

	'jobs' => [
		'product' => [
			'import' => [
				'csv' => [
					'location' => public_path( '/aimeos/products-import-example.csv' ),
					'container' => [
						'type' => 'Directory',
						'content' => 'CSV',
					],
					'skip-lines' => 1,
				]
			],
			'export' => [
				'location' => public_path('aimeos')
			]
		]
	],

	....
In the file "product-import-example.csv" I replaced "path/to/image2.jpg" with "".

Run command from terminal:

Code: Select all

> php artisan aimeos:jobs "product/import/csv" "default"
Unfortunately, I did not see an error, and the products were not displayed in the admin panel at my-shop.ru/admin/default/jqadm/search/product?locale=en
Throws an error only if there is no connection to the database (server not enabled).

However, the command run from the terminal was completed successfully:

Code: Select all

> php artisan aimeos:jobs "product/export/sitemap" "default"
Versions:
aimeos-laravel - 2023.04
Laravel - 10.12.0
PHP - 8.1
MySQL - 8.0
Windows 10

Please tell me how to import products?

ivanessans
Posts: 3
Joined: 29 May 2023, 21:47

Re: I am unable to import test products using cronjobs, tried different settings.

Post by ivanessans » 03 Jun 2023, 10:45

Please HELP solve the problem! Tried different options. I have no one else to turn to.

The site is loading. There is access to the database. Can't import products.

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

Re: I am unable to import test products using cronjobs, tried different settings.

Post by aimeos » 03 Jun 2023, 11:47

Your location path is wrong. If you've upgraded from 2022.x to 2023.x, it changes from an absolute path to a relative path within the virtual file system defined here:
https://github.com/aimeos/aimeos/blob/m ... #L115-L118

By default (without your configuration), it would be:

Code: Select all

./storage/import/product/
Remove these lines in your config and place your file in the directory mentioned above to import your file:

Code: Select all

'location' => public_path( '/aimeos/products-import-example.csv' ),
'container' => [
	'type' => 'Directory',
	'content' => 'CSV',
],
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

ivanessans
Posts: 3
Joined: 29 May 2023, 21:47

Re: I am unable to import test products using cronjobs, tried different settings.

Post by ivanessans » 04 Jun 2023, 14:26

Thanks, it worked!

Post Reply