Limit the number of decimals shown on the price slider
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
I’ve setup a price slider for my WooCommerce site.
I’d like to limit the number of decimals shown on the slider.
Our slider is built on the ion.rangeSlider: https://ionden.com/a/plugins/ion.rangeSlider/demo.html
You can use all the ion.rangeSlider javascript options in the facet javascript text area:
For instance, to display 3 decimals:
wpsolr_ion_range_slider_options = {
type: "double",
grid: false,
prefix: "€",
prettify_enabled: true,
prettify: function (num) {
return Number.parseFloat(num).toFixed(3);
}
};
You must be logged in to reply to this topic.