I am unable to import test products using cronjobs

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)
Spam and unrelated posts will be removed immediately!
kuro
Posts: 9
Joined: 10 Oct 2023, 08:54

I am unable to import test products using cronjobs

Post by kuro » 10 Oct 2023, 09:29

Hi all!

To import products, I used the instructions at this link: https://aimeos.org/docs/2023.x/cronjobs ... sv-import/
I also want to display my settings file(D:\myshop\config\shop.php):

Code: Select all

	'client' => [
		'html' => [
			'basket' => [
				'cache' => [
					// 'enable' => false, // Disable basket content caching for development
				],
			],
			'common' => [
				'cache' => [
					// 'force' => true // enforce caching for logged in users
				],
			],
			'catalog' => [
				'lists' => [
					'basket-add' => true, // shows add to basket in list views
					// 'infinite-scroll' => true, // load more products in list view
					// 'size' => 48, // number of products per page
				],
				'selection' => [
					'type' => [// how variant attributes are displayed
						'color' => 'radio',
						'length' => 'radio',
						'width' => 'radio',
					],
				],
			],
		],
	],

	'controller' => [
		'frontend' => [
			'catalog' => [
				'levels-always' => 3 // number of category levels for mega menu
			]
		],
		'jobs' => [
			'product' => [
				'import' => [
					'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
							],
							'media' => [
								8 => 'media.url', // relative URL of the product image on the server
							],
							'price' => [
								9 => 'price.currencyid', // three letter ISO currency code
								10 => 'price.quantity', // the quantity the price (for block pricing)
								11 => 'price.value', // price with decimals separated by a dot
								12 => 'price.taxrate', // tax rate with decimals separated by a dot
							],
							'attribute' => [
								13 => 'attribute.code', // code of an attribute, will be created if not exists
								14 => 'attribute.type', // e.g. "size", "length", "width", "color", etc.
							],
							'product' => [
								15 => 'product.code', // e.g. EAN code of another product
								16 => 'product.lists.type', // e.g. "suggestion" for suggested product
							],
							'property' => [
								17 => 'product.property.value', // arbitrary value for the corresponding type
								18 => 'product.property.type', // e.g. "package-weight"
							],
							'catalog' => [
								19 => 'catalog.code', // e.g. Unique category code
								20 => 'catalog.lists.type', // e.g. "promotion" for top seller products
							],
						]
					]
				],
			]
		]
	],
i am a new stater for php and aimeos,so i only changed the shop.php file above, i put the csv file in "D:\myshop\storage\import\product\products-import-example.csv", i start the server in D:\myshop\ using 'php artisan serve',then i start another cmd php artisan aimeos:jobs "product/csv/import job controller",and got some errors,please check the Attachments.

2. i want to add a catagory named blog to the nav and put some articles on that, where can i do that?
3. i want to replace the product page's price to an Inquiry form,, where can i do that?
4.i want to remove the basket and add to basket button, where can i do that?
please help me .

Versions:
aimeos - 2023.07.2(https://github.com/aimeos/aimeos)
Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.2.4
mysqlnd 8.2.4
Windows 11
Attachments
Snipaste_2023-10-10_17-36-41.jpg
Snipaste_2023-10-10_17-36-41.jpg (63.58 KiB) Viewed 60335 times
Snipaste_2023-10-10_17-36-50.jpg
Snipaste_2023-10-10_17-36-50.jpg (73.84 KiB) Viewed 60335 times

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

Re: I am unable to import test products using cronjobs

Post by aimeos » 10 Oct 2023, 09:43

Wrong command, you must use:

Code: Select all

php artisan aimeos:jobs product/csv/import
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kuro
Posts: 9
Joined: 10 Oct 2023, 08:54

Re: I am unable to import test products using cronjobs

Post by kuro » 11 Oct 2023, 01:08

aimeos wrote: 10 Oct 2023, 09:43 Wrong command, you must use:

Code: Select all

php artisan aimeos:jobs product/csv/import
LogicException ,see the attachment


Versions:
aimeos - 2023.07.2(https://github.com/aimeos/aimeos)
Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.2.4
mysqlnd 8.2.4
Windows 11
Attachments
Snipaste_2023-10-11_09-07-31.jpg
Snipaste_2023-10-11_09-07-31.jpg (63.68 KiB) Viewed 60308 times
Last edited by kuro on 11 Oct 2023, 06:21, edited 2 times in total.

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

Re: I am unable to import test products using cronjobs

Post by aimeos » 11 Oct 2023, 06:38

Sorry it's:

Code: Select all

php artisan aimeos:jobs product/import/csv
See: https://aimeos.org/docs/latest/laravel/ ... once-a-day
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

kuro
Posts: 9
Joined: 10 Oct 2023, 08:54

Re: I am unable to import test products using cronjobs

Post by kuro » 11 Oct 2023, 06:46

aimeos wrote: 11 Oct 2023, 06:38 Sorry it's:

Code: Select all

php artisan aimeos:jobs product/import/csv
See: https://aimeos.org/docs/latest/laravel/ ... once-a-day
Symfony\Component\Mailer\Exception\TransportException ,
see the attachment
Attachments
Snipaste_2023-10-11_14-45-45.jpg
Snipaste_2023-10-11_14-45-45.jpg (72.61 KiB) Viewed 60303 times

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

Re: I am unable to import test products using cronjobs

Post by aimeos » 11 Oct 2023, 06:51

There's an error when importing the CSV file and you didn't configure the mail server in your .env file.
For import errors, you should have a look into the Log panel of the admin backend.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

beenzu
Posts: 13
Joined: 12 Feb 2024, 04:08

Re: I am unable to import test products using cronjobs

Post by beenzu » 27 Feb 2024, 18:24

win 10/php8.1.2/Aimeos:2023.10.x

I am experiencing the same error after running the cmd :

php artisan aimeos:jobs product/csv/import.

Did you resolve the resolve the error? The logs show the same error

Post Reply