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: 8239
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!

syedaliiftikhar
Posts: 12
Joined: 19 Apr 2024, 18:29

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

Post by syedaliiftikhar » 19 Apr 2024, 23:04

I'm also not able to import any product, no error is showing.
Followed the documentation and above suggestion as well but nothing worked for me

Laravel 11.4.0
Aimeos 2024.4
PHP 8.3.6
Ubuntu 20.04.3 LTS

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

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

Post by aimeos » 21 Apr 2024, 10:14

Beginning with 2024.04.x, the files are expected to be in a sub-directory named like the site code so the files can be imported for different sites. See: https://aimeos.org/docs/latest/cronjobs ... e-location
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply