Facets not ‘stacking’
Currently testing WPSOLR on a Woocommerce shop with more than 25000 products. It’s important to us to be able to select multiple filters; For example brand:Samsung AND color:yellow.
We’re using the “Current theme” template with AJAX with the Facets widget. When I select a brand, the results are filtered for that brand and the counts are updated in the other facets. So I can see there is only one white Samsung for example.
But if I then click the color white, I expect to see that one product, that white samsung. Instead, the brand filter is removed and I get all white products.
Can you please explain what I should do to get this working?
Thanks for the quick reply
It’s a large list of filters, so I’ll post the ‘Brand’ and ‘Color’ sections
This is the entire list:
The console shows no errors. Debug log has a warning
trim() expects parameter 1 to be string, array given
Sure, this is the schema
I think it’s coming from WP, because when I click the second filter, the first disappears from the querystring:
First filter querysstring:
Then after selecting a color, the querystring becomes
Alright, so I’ve created a test index on Elastic search and let it index a couple hundred products. It seems to keep the filters configuration, so it was easy to test
Unfortunately, I see the same result. I’ve made a screencapture for you to see
Interesting is that the PHP Warning is gone, so that is indeed related to the configuration but it seems not to the problem
- This reply was modified 3 months, 1 week ago by HaikoG.
Ok, so I found something;
If I change the layout of the filter from checkboxes to select (select2.js and regular) I’m able to “stack” the filters, but only the filters which have the select layout get stacked. The filter from the checkbox is overridden when selecting an other.
I do like to use the checkbox layout though, UX wise that makes more sense
You must be logged in to reply to this topic.