Add product, creates two product items ineasted of one

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!
User avatar
ahmed31916
Posts: 90
Joined: 14 Apr 2022, 12:15

Add product, creates two product items ineasted of one

Post by ahmed31916 » 20 May 2022, 09:32

Hello,

I'm trying to create a new selection product (I mean selection type). But it creates two product items, one with name <item[product.label]> and other with name <selection[0][product.label]>. I don't why!

This is the request:

Code: Select all

category[default-0][catalog.id]: 2
category[default-0][product.lists.type]: default
item[product.code]: test_product
item[product.label]: test product
item[product.status]: 1
item[product.type]: select
media[0][file]: 1649046045006.jpg
media[0][media.label]: 
media[0][media.status]: 1
media[0][media.type]: default
media[0][product.lists.type]: default
media[1][file]: 
media[1][media.label]: 
media[1][media.status]: 1
media[1][media.type]: default
media[1][product.lists.type]: default
media[2][file]: 
media[2][media.label]: 
media[2][media.status]: 1
media[2][media.type]: default
media[2][product.lists.type]: default
price[0][price.currencyid]: ILS
price[0][price.lists.type]: default
price[0][price.rebate]: 4
price[0][price.status]: 1
price[0][price.type]: default
price[0][price.value]: 55
selection[0][attr][0][attribute.label]: ferfef
selection[0][attr][0][product.lists.refid]: 10
selection[0][attr][0][product.lists.siteid]: 1.9.
selection[0][product.code]: test
selection[0][product.label]: test
selection[0][product.status]: 1
selection[0][product.type]: default
selection[0][stock.stocklevel]: 6
text[0][product.lists.type]: default
text[0][text.content]: test description
text[0][text.label]: labell
text[0][text.status]: 1
text[0][text.type]: name
I need just the selection one, why the other is created?

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

Re: Add product, creates two product items ineasted of one

Post by aimeos » 21 May 2022, 20:37

A selection product must have at least one variant article, otherwise you should create products of type "default" instead (standard article).
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ahmed31916
Posts: 90
Joined: 14 Apr 2022, 12:15

Re: Add product, creates two product items ineasted of one

Post by ahmed31916 » 21 May 2022, 21:24

Ok, but I already did it.
selection[0][attr][0][attribute.label]: ferfef
selection[0][attr][0][product.lists.refid]: 10
selection[0][attr][0][product.lists.siteid]: 1.9.
selection[0][product.code]: test
selection[0][product.label]: test
selection[0][product.status]: 1
selection[0][product.type]: default
selection[0][stock.stocklevel]: 6
Is this request incomplete? does it need to add other parameter?

Code: Select all

category[default-0][catalog.id]: 2
category[default-0][product.lists.type]: default
item[product.code]: test_product
item[product.label]: test product
item[product.status]: 1
item[product.type]: select
media[0][file]: 1649046045006.jpg
media[0][media.label]: 
media[0][media.status]: 1
media[0][media.type]: default
media[0][product.lists.type]: default
media[1][file]: 
media[1][media.label]: 
media[1][media.status]: 1
media[1][media.type]: default
media[1][product.lists.type]: default
media[2][file]: 
media[2][media.label]: 
media[2][media.status]: 1
media[2][media.type]: default
media[2][product.lists.type]: default
price[0][price.currencyid]: ILS
price[0][price.lists.type]: default
price[0][price.rebate]: 4
price[0][price.status]: 1
price[0][price.type]: default
price[0][price.value]: 55
selection[0][attr][0][attribute.label]: ferfef
selection[0][attr][0][product.lists.refid]: 10
selection[0][attr][0][product.lists.siteid]: 1.9.
selection[0][product.code]: test
selection[0][product.label]: test
selection[0][product.status]: 1
selection[0][product.type]: default
selection[0][stock.stocklevel]: 6
text[0][product.lists.type]: default
text[0][text.content]: test description
text[0][text.label]: labell
text[0][text.status]: 1
text[0][text.type]: name

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

Re: Add product, creates two product items ineasted of one

Post by aimeos » 23 May 2022, 07:22

This is the posted data in the product detail view of the admin backend that created the selection variant article. The "item" key is the one which creates the top level product and its type should be "default" if you want to create a standard product in the product detail view of the admin backend.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ahmed31916
Posts: 90
Joined: 14 Apr 2022, 12:15

Re: Add product, creates two product items ineasted of one

Post by ahmed31916 » 23 May 2022, 07:40

Actually, I want to create a Selection Type just to give it (a product) a color attribute.
Is this possible if I make it's type "Default"?

What the difference between "Selection Type" and "Default Type"?

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

Re: Add product, creates two product items ineasted of one

Post by aimeos » 24 May 2022, 06:27

Yes, attributes can be added to any product type as everything can be combined in Aimeos.

Products of type "select" must have variant articles identified by a unique variant attribute combination while products of type "default" are standard articles you can use for any simple article.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply