Developer forum

Forum » Ecommerce - Standard features » Show Parent products and Variants in search results

Show Parent products and Variants in search results

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I have a situation where I need to display in search results Parent products (that don't have variants) and individual variantas (without displaying the parent product as well).
I am not sure how should I set up this condition. In the end, what I need, is to display in search results only the SKU's that can be added in cart directly.

Thank you,

Adrian


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

Is it accurate to assume that a product (with variants) does not have a SKU? That said, can't you filter by products where SKU is not empty?

 

Best Regards,

Nuno Aguiar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

Not really. Most (if not all) products have a value for ProductNumber in some projects we set it to the same value as ProductID. But that's not the case in all projects.

I was wondering maybe there's a generated field that I can use in the query. Or something else that can help me achieve this result.

Thank you,
Adrian

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

Right, I have the same problem. The best I could come up with so far is a mix of price (typically master products would have no price) and/or not have a sku.

 

What you want to exclude is essentially a "DW record" that is not purchasable and/or there is no ERP association to. I guess the biggest problem is when you do a free text search and you want to list all products with no variants, but if you do have variants only show, for example the color variant group and not the sizes (so you don't get "T-shirt green S" + "T-shirt green M" + "T-shirt green L" + "T-shirt Red S"... - just show 1 per color.

 

I would love to see a solution for that too. I know there's a "group by first variant" option in the query expressions, but that doesn't work when you have a mixed bag of results.

 

Nuno Aguiar

 
Fabio Monte
Reply

Just came across this as we are also having the same issue.

When searching for a variant, it wont be listed on the search results, only the parent product will show.

Since this has some years already, is there a solution that we can set up?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Fabio

Take a look at this thread - I guess that is the best bet:

https://doc.dynamicweb.com/forum/ecommerce-standard-features/ecommerce-standard-features/show-only-colors-in-product-list-and-keep-filter-possibilities

Votes for this answer: 1

 

You must be logged in to post in the forum