Facets not ‘stacking’
3 years, 7 months ago #14568
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, Haiko3 years, 7 months ago #14570
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:
https://drive.google.com/open?id=1wBGKhyFWeLHTJ7ShU6ibVF4RrmcdLd093 years, 7 months ago #14574
The console shows no errors. Debug log has a warning
trim() expects parameter 1 to be string, array given
wp-content/plugins/wpsolr-pro/wpsolr/core/classes/engines/class-wpsolr-abstractsearchclient.php:28783 years, 7 months ago #14578
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
?wpsolr_fq%5B0%5D=pa_kleur-van-het-product_str%3AZilver%2C%20Wit3 years, 7 months ago #14619
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
3 years, 7 months ago #14621
- This reply was modified 3 years, 7 months 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.