Developer forum

Forum » Ecommerce - Standard features » Limit facets to include only options within that current group

Limit facets to include only options within that current group

Kim Søjborg Pedersen
Reply

If you are on a group, I what to limit the facet possibilities to include only options within that product group. Here is why I ask: 

Example : We are selling shoes and you have a variantgroup "Shoe Sizes" With options from 20-48. You have a Query with an Expression "Variant options" and a facet group for them to render in the frontend. You have 2 product groups "Kids" and "Men". Now you go to the shop and select the group "Men". Here you don't want to show kids sizes, becouse men shoes is only in sizes from lets say 40-48. At the same time I what to show that lets say size "41" is not accessible (option disabled in dropdown) becouse you maybe have chosen the color "Red" in another facet. To do that I check "Show facet options with no results".

Can this be done? 

Regards
Kim


Replies

 
Nicolai Pedersen
Reply

Hi Kim

That is currently not possible. It would require some kind of setting on a facet group that will somehow make the facet calculation cope with that situation. If you have any brigth ideas, I'll be glad to hear them.

BR Nicolai

 
Kim Søjborg Pedersen
Reply

Hi Nicolai

Maybe you could make it on the query like you do with the language context. So you could make a :

Group Id - Contains - Dyamicweb.Ecommerce.Context.GroupId

Regards
Kim

 
Kim Søjborg Pedersen
Reply

I made a feature request on this for a couple of dags ago

http://doc.dynamicweb.com/forum/feature-requests/show-facet-options-with-no-results-but-only-within-the-group-context?PID=1605 

 
Nicolai Pedersen
Reply

That would be viable way - but also a bit static since it would work for groups, but not for other kinds of facets.

I might be able to do some setting on the facet group and some logic in the calculation.

Facet groups

  • Groups (marked as 'Calculate facet options with this as primary' - or something more explaining)
  • Colors
  • Sizes

Then if your querystring looks like this:
&Group=Group1&Colors=[red][blue]

The facet calculation can do some calculation magic based on that setting and because the Group parameter is the first.

So if you do like this:

&Otherfacet=somevalue&Group=Group1&Colors=[red][blue]

It will not do the calculation magic.

In this way, you can add that setting to multiple facetgroups, and depending on the order in querystring, control which one is used for 'calculation magic'. That would be a bit more dynamic for other scenarioes than just product groups.

How does that sound?

BR Nicolai

 
Kim Søjborg Pedersen
Reply

Hi Nicolai
That sounds really nice to me

Regards
Kim

 

You must be logged in to post in the forum