Page 1 of 1

Add product, creates two product items ineasted of one

Posted: 20 May 2022, 09:32
by ahmed31916
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?

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

Posted: 21 May 2022, 20:37
by aimeos
A selection product must have at least one variant article, otherwise you should create products of type "default" instead (standard article).

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

Posted: 21 May 2022, 21:24
by ahmed31916
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

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

Posted: 23 May 2022, 07:22
by aimeos
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.

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

Posted: 23 May 2022, 07:40
by ahmed31916
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"?

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

Posted: 24 May 2022, 06:27
by aimeos
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.