Bulk photo import and automatic product creation

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!
User avatar
aimeos
Administrator
Posts: 7935
Joined: 01 Jan 1970, 00:00

Re: Bulk photo import and automatic product creation

Post by aimeos » 02 May 2024, 20:59

The text type is not correct for example. You have a working example file here:
https://aimeos.org/docs/latest/cronjobs ... est-import
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ondrei
Posts: 8
Joined: 24 Apr 2024, 14:13

Re: Bulk photo import and automatic product creation

Post by ondrei » 02 May 2024, 21:15

I tried uploading a working example (I deleted the mapping.), and in the admin, only one of the three products shows up.

Yet, the log displays that two out of three were imported..

Code: Select all

2024-05-02 21:09:03	import/csv/product	6	58132be6f0c404c629d48dd85d1ed352	Finished product import from "product/default"	

2024-05-02 21:09:03	import/csv/product	6	58132be6f0c404c629d48dd85d1ed352	Finished product import from "product/default/products-import-example.csv" (2/3)

Code: Select all

5920 select	job_csv_test	job csv test selection

User avatar
ondrei
Posts: 8
Joined: 24 Apr 2024, 14:13

Re: Bulk photo import and automatic product creation

Post by ondrei » 03 May 2024, 04:04

What is wrong with currencyid?

Please, hlep. ^^

shop.php:

Code: Select all

	'controller' => [
		'frontend' => [
			'catalog' => [
				'levels-always' => 7 // number of category levels for mega menu
			]
		],

		'jobs' => [
			'product' => [
				'import' => [
					'csv' => [
						'location' => 'product',
						'skip-lines' => 1,
						'mapping' => [
							'item' => [
								0 => 'product.code',
								1 => 'product.label',
								2 => 'product.type',
								3 => 'product.status',
							],
							'media' => [
								4 => 'media.url',
							],
							'price' => [
								5 => 'price.currencyid',
								6 => 'price.quantity',
								7 => 'price.value',
								8 => 'price.taxrate',
							],
							'catalog' => [
								9 => 'catalog.code',
								10 => 'catalog.lists.type',
							],
						]
					]
				]
			]
		]
	],
import.csv:

Code: Select all

product.code,product.label,product.type,product.status,media.url,price.currencyid,price.quantity,price.value,price.taxrate,catalog.code,catalog.lists.type
00001,00001,default,1,https://aimeos.org/media/default/product_01_A-big.webp,EUR,1,50,0,bob,default
Admin log:

Code: Select all

Unable to import product with code "00001": Invalid ISO currency code
I've installed a completely new Aimeos, without a single modification.

What am I missing? Could it possibly be any simpler? ^^

Plus: How should I write the path to an image that is located in ./public/media/00001.jpg?

For an infinite quantity, should I enter the symbol ∞?

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

Re: Bulk photo import and automatic product creation

Post by aimeos » 03 May 2024, 19:46

ondrei wrote: 03 May 2024, 04:04 What is wrong with currencyid?

Code: Select all

Unable to import product with code "00001": Invalid ISO currency code
Seems to be OK and we can see no error in your mapping or your file. EUR as currency is also activated by default after a standard installation.
ondrei wrote: 03 May 2024, 04:04 Plus: How should I write the path to an image that is located in ./public/media/00001.jpg?
Put the files in ./public/aimeos/files/ and use "files/00001.jpg" as image path in your CSV file. But keep in mind that these files are public and everyone can download them if they know the path.
ondrei wrote: 03 May 2024, 04:04 For an infinite quantity, should I enter the symbol ∞?
No, leave it empty.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply