dynamicweb / DynamicWeb

Make feature requests for Dynamicweb in Issues section of this repository
https://doc.dynamicweb.dev/documentation/fundamentals/support/feature-requests.html
GNU General Public License v3.0
1 stars 0 forks source link

Index query filter on "First variant in group in stock" #138

Closed dwlhs closed 2 months ago

dwlhs commented 2 months ago

Hi :)

We have a situation where a customer of ours wants to display different colours of variants on the PLP, but the don't want to show colours that are not in stock. We can handle these requirements separately in the query by using "First variant in group" and "Stock", but it the first variant is not in stock, the colour variantion will not be displayed in the list.

This makes sense as the query expression assumes single records and not nested statements. So, in order to achieve this, we would need a "First variant in group in stock" field in the index to not rule out the entire colour variantion if the first e.g. red variant is not in stock.

We could create a custom ProductIndexBuilderExtender for that, but you might consider it for future enhancements :)

Br. Lars