Developer forum

Forum » Ecommerce - Standard features » Index Query - when i have many variants combined in PIM, how do I get only the primary product?

Index Query - when i have many variants combined in PIM, how do I get only the primary product?

Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

We have products combined in PIM, so that variants are grouped - but when i use Index Query to make a type-ahead search, my query setup and query publisher outputs all the variants of the same product, and I can´t figure out how to single out the master/primary product (or variant) in the query result.

How can i cotrol this?

/Hans

 

 


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

There should be an Is Variant field available in the index.

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Thank you Imar

Yes, i tried that one - but strangely, they are all false. When combining products in PIM, we have selected what variant should be default. But that does not appear to set a primary variant.

Am i missing something on how to set/select a default variant in PIM?

/Hans

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Don´t know if that plays a role, but the products have not been published yet - and it actually appears that the query only finds products that have not been combined in PIM. So maybe it´s something else all togehter?

Untill now, my products only live in PIM, and my query looks like this

 

 

/Hans

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

I just tested out the Is (primary) variant options on a manually combined product (that was initially created in Ecommerce) and that works as expected for me, so it could be something else indeed.

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hmm, found out that selecting default when combining products, does not set the product you select as default as the default/primary variant.

So thats the explanation.

Is there any chance of setting the product you select as default when combining products - as the primary variant via eg. SQL?

/Hans

 

 

You must be logged in to post in the forum