Product Import - How to import "selection" products?
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Product Import - How to import "selection" products?
PHP: 7.1.18
Laravel: 5.6
Aimeos: 2018.04
Hi,
I followed "Import products from CSV" link (given below) and imported all products. Link:
https://aimeos.org/docs/Developers/Cont ... s_from_CSV
But it turned out that I am dealing with Parent-child products, which are "Selection" products in Aimeos (I think). So, the question is, how I import products (of all types), choose product type, and associate child products?
I know I can set "product.type" key in "item" array to "selection" but how choose which products are "variants?" This has to be done during CSV read.
Please, help!
Thanks!
Laravel: 5.6
Aimeos: 2018.04
Hi,
I followed "Import products from CSV" link (given below) and imported all products. Link:
https://aimeos.org/docs/Developers/Cont ... s_from_CSV
But it turned out that I am dealing with Parent-child products, which are "Selection" products in Aimeos (I think). So, the question is, how I import products (of all types), choose product type, and associate child products?
I know I can set "product.type" key in "item" array to "selection" but how choose which products are "variants?" This has to be done during CSV read.
Code: Select all
'item' => array(
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)
),
Thanks!
Re: Product Import - How to import "selection" products?
The default mapping listed here contains the "product" section (line 27):
https://aimeos.org/docs/Developers/Cont ... lt_mapping
If the "product.lists.type" is "default", all values (separated by new line) in the column for "product.code" are the articles that belong the to selection product. The articles must be imported before the selection product to make this work. The example file linked in the documentation contains an example (2nd line is an article, 3rd line is a selection product -> see column with label "subproduct code"):
https://aimeos.org/docs/Developers/Cont ... lt_mapping
If the "product.lists.type" is "default", all values (separated by new line) in the column for "product.code" are the articles that belong the to selection product. The articles must be imported before the selection product to make this work. The example file linked in the documentation contains an example (2nd line is an article, 3rd line is a selection product -> see column with label "subproduct code"):
Code: Select all
"item code","item label","item type","item status","text type","text content","text type","text content","media url","price currencyid","price quantity","price value","price tax rate","attribute code","attribute type","subproduct code","product list type","property value","property type","catalog code","catalog list type"
"job_csv_test","job csv test product","default",1,"short","short description","long","long description","path/to/image.jpg","EUR",1,"10.00","20.00","import-test","size",,,"1.50","package-weight","home","promotion"
"job_csv_test2","job csv test 2. product","select",1,"short","short selection description","long","long selection description","path/to/image2.jpg","EUR",1,"10.00","20.00",,,"job_csv_test","default","1.50","package-weight",,
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Product Import - How to import "selection" products?
Hi,aimeos wrote:The default mapping listed here contains the "product" section (line 27):
https://aimeos.org/docs/Developers/Cont ... lt_mapping
If the "product.lists.type" is "default", all values (separated by new line) in the column for "product.code" are the articles that belong the to selection product. The articles must be imported before the selection product to make this work. The example file linked in the documentation contains an example (2nd line is an article, 3rd line is a selection product -> see column with label "subproduct code"):Code: Select all
"item code","item label","item type","item status","text type","text content","text type","text content","media url","price currencyid","price quantity","price value","price tax rate","attribute code","attribute type","subproduct code","product list type","property value","property type","catalog code","catalog list type" "job_csv_test","job csv test product","default",1,"short","short description","long","long description","path/to/image.jpg","EUR",1,"10.00","20.00","import-test","size",,,"1.50","package-weight","home","promotion" "job_csv_test2","job csv test 2. product","select",1,"short","short selection description","long","long selection description","path/to/image2.jpg","EUR",1,"10.00","20.00",,,"job_csv_test","default","1.50","package-weight",,
Thanks for the help! It worked. But it should be little advanced. For example if child products comes after parent product then this should work. Anyhow, I have another question. If you go to Import Product via CSV documentation, it has a section on Media:
https://aimeos.org/docs/Developers/Cont ... _CSV#Media
Now if I have more than 1 media URLs then how I shall tackle that in CSV?
Please, reply!
Thanks!
Re: Product Import - How to import "selection" products?
The articles must come first because you need them to be added to your database so you can access their ID which needs to be associated to your selection product.
You can add several media URLs by listing them in the same field of the CSV separated by new lines (\n)
You can add several media URLs by listing them in the same field of the CSV separated by new lines (\n)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Product Import - How to import "selection" products?
Hi,aimeos wrote:The articles must come first because you need them to be added to your database so you can access their ID which needs to be associated to your selection product.
You can add several media URLs by listing them in the same field of the CSV separated by new lines (\n)
Yes yes, I totally understand the hierarchy. Child products have to be added before Parent product but we can have product cache/temp table to store Parent products in this scenario until their children are not added. Well, let us drop this argument. You guys are experts.
Anyhow, I love the idea for multiple images and how I can separate them with "New line." Now, I shall go one step further. Is there a way I can store media images locally while importing products?
Please, reply!
Thanks!
Re: Product Import - How to import "selection" products?
That's up to you. The CSV file only contains relative URLs to the images and you can store the images on you local server for sure. The easiest way ist to store them somewhere in your ./<app>/public/ directory.mohal_04 wrote: Anyhow, I love the idea for multiple images and how I can separate them with "New line." Now, I shall go one step further. Is there a way I can store media images locally while importing products?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Product Import - How to import "selection" products?
OK thanks!aimeos wrote:That's up to you. The CSV file only contains relative URLs to the images and you can store the images on you local server for sure. The easiest way ist to store them somewhere in your ./<app>/public/ directory.mohal_04 wrote: Anyhow, I love the idea for multiple images and how I can separate them with "New line." Now, I shall go one step further. Is there a way I can store media images locally while importing products?