WPSolr Price filter design

  • O-O
    Participant
    4 years, 8 months ago #16646

    Hi,

    When I use the range price filter I get a lot of decimals. Is there a Javascript option like the prefix: “€”}; to delete all these decimals, and have round prices like €10 till €100 ?

    Kind regards,

    Jamie

    wpsolr
    Keymaster
    4 years, 8 months ago #16649

    Can you copy here your current javascript options for your ion.rangeslider filter?

    O-O
    Participant
    4 years, 8 months ago #16651

    wpsolr_ion_range_slider_options = { grid: true, prefix: “€”};

    wpsolr
    Keymaster
    4 years, 8 months ago #16654

    This should make the trick (inspired by https://ionden.com/a/plugins/ion.rangeSlider/demo.html#a_prettify):

    wpsolr_ion_range_slider_options = { grid: true, prefix: "€", prettify: function my_prettify (n) {
            return Math.floor(n);
        }};
    O-O
    Participant
    4 years, 8 months ago #16658

    Yes it works, Thank you!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.