Thank you for waiting.
I've reviewed the view "Voertuigen Filter" used on the page "Voertuigen" and here are my findings:
1/ losing the AJAX feature really hurts as it requires an extra click from the visitor. Is there a workaround to still be able to benefit from AJAX filtering?
- I'm not sure, why Luo suggested turning off the AJAX option in the other ticket, but, based on my testing, it works as expected.
I've enabled it in your website's view and you're welcome to test it as well and let me know if you see something out of place.
2/ I followed the steps in the last reply in the previous ticket, but filtering does not work. I set a price of eg. €10.000 which should result in 0 results, still, both cars are visible. No matter which From or Till price I set, I get 0 results.
- The filtering was not working correctly on your website because, you've added the prices in the custom field as a decimal value, for example, "27.733", "28.300", and "30.990" etc.
I understand that you've used the "." here as a thousand separator and for formatting purposes, but mathematically it is treated as a decimal value, within one hundred (100). As a result, the filtering fails as it is comparing values in thousands and not under 100.
As a quick fix, I've updated the custom values passed in the search field filters shortcode to also use decimal values and it seems to be working now.
Old shortcodes for the price search field:
[wpv-control-postmeta display_values="€ 0,€ 10.000, €20.000,€ 30.000,€ 40.000,€ 50.000" values="0,10000,20000,30000,40000,50000" field="wpcf-prijs" type="select" source="custom" url_param="wpv-wpcf-prijs_min"]
[wpv-control-postmeta display_values="tot,€ 10.000,€ 20.000,€ 30.000,€ 40.000,€ 50.000,€ 60.000,€ 70.000,€ 80.000,€ 90.000,€ 100.000" values="100000,10000,20000,30000,40000,50000,60000,70000,80000,90000,100000" field="wpcf-prijs" type="select" source="custom" url_param="wpv-wpcf-prijs_max"]
Updated shortcodes for the price search field:
[wpv-control-postmeta display_values="€ 0,€ 10.000, €20.000,€ 30.000,€ 40.000,€ 50.000" values="0,10.000,20.000,30.000,40.000,50.000" field="wpcf-prijs" type="select" source="custom" url_param="wpv-wpcf-prijs_min"]
[wpv-control-postmeta display_values="tot,€ 10.000,€ 20.000,€ 30.000,€ 40.000,€ 50.000,€ 60.000,€ 70.000,€ 80.000,€ 90.000,€ 100.000" values="100.000,10.000,20.000,30.000,40.000,50.000,60.000,70.000,80.000,90.000,100.000" field="wpcf-prijs" type="select" source="custom" url_param="wpv-wpcf-prijs_max"]
However, I'll recommend not to store the price values with the thousand separators and store only raw numeric values, e.g. "27733", "28300", and "30990" etc, since that is their true mathematical representation.
To show these raw numerical values on the front-end formatted with a thousands separator, you can use a custom shortcode to convert their output, as suggested in this reply:
https://toolset.com/forums/topic/i-want-to-arrange-my-homes-by-price-lowest-to-highest/#post-1951997
Note: I've also commented out the custom code snippet "range-filters" added in the Toolset's custom code section, as it doesn't seem to be needed.