Developer forum

Forum » Rapido » Facets showing products with filed value = False

Facets showing products with filed value = False

Mads Knudsen
Reply

Hi, 

We are running DW version 9.10.12 Rapido version and have an issue with the standard facet functionality based on the field type. We have some boolean fields, and the problem is that a false (not set) boolean is rendered as false in the frontend for the facet. 

 

How can this be resolved, so facet options with only false-values are not rendered in the frontend? 

 


Replies

 
Nicolai Pedersen
Reply

There is no built in way of handling that... You could index the boolean product field to an unanalyzed text field in the index instead of a boolean field and base the facet on that. Then the not set would be empty string and would not show up as a facet value. You would then maybe have a "True" value for those that is set to true and need to translate that value somehow.

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply
This post has been marked as an answer

Hi Mads,

 

Assuming you only want the facet for True values, another workaround is to create a "List" facet and only set the option for "True".

That way the facet is only rendered when there the value is "True" and there's no need to do any index fields. 

 

We've used this on a project with positive results.

 

Best Regards,

Nuno Aguiar

Votes for this answer: 1

 

You must be logged in to post in the forum