Hello, I have several filters setup on a product catalog. When I filter by more than one criteria, the returned results include all products that have criteria_1 OR criteria_2. Is there a way to change the filtering so the results will display products that have criteria_1 AND criteria_2?
Developer forum
E-mail notifications
Filtering - multiple filters
Replies
Hi Alexander
It is an AND search. Are you sure you have all parameters in the URL all at once?
Do you have a link so we can have a look?
Nicolai
Hi Nicolai,
This is the link, where it's implemented - http://dlf.dev.bleaudev.dk/da-DK/Segments/Annual-ryegrass.aspx
I filter with ajax calls using URL parameters like this: http://dlf.dev.bleaudev.dk/da-DK/Segments/Annual-ryegrass.aspx?attributeFilter=very_dense&attributeFilter=very_fine
You can see where the confusion comes from, if you try different combinations of the first 2 checkboxes under "Attributes". We shouldn't get more products when the first 2 filters are seleted than when only one of them is.
Alex
Hi Alexander
Ah, now I understand. It is 2 values on the same field. Thought it was 2 different fields. That is described in the section "Using the filters" found here:
This behavior cannot be overriden using querystring parameters.
You can make your own filter provider changing this behavior.
I've just added the feature to the provider so you from the UI of the delimit filter can choose if the operator should be AND or OR. But that will be a 8.5.1 feature.
Attached the update filter. You can compile it and add it to your solution.
BR Nicolai
Thanks Nicolai :)
Hi Nicolai,
It is great that you added the option to select the AND/OR operator on the delimit filter, but...
We actually need this on a "product field value" filter where we filter on product category field values. We cannot use the delimit filter for this.
Sometimes we need AND, other times we need OR.
Could you make the and/or operator options available on the "product field value" filter?
BR
Morten
Hi
This feature #16418 now implemented in Dynamicweb version 8.5.1.18
Kind Regards
Dynamicweb Support
Kristian Kirkholt
You must be logged in to post in the forum