Limit the number of decimals shown on the price slider

  • pseudo visitor
    5 years ago #6956

    I’ve setup a price slider for my WooCommerce site.

    I’d like to limit the number of decimals shown on the slider.

    5 years ago #6957

    Our slider is built on the ion.rangeSlider:

    You can use all the ion.rangeSlider javascript options in the facet javascript text area:

    Facets slider javascript settings

    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);
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.