I have a price slider on my site and price range is displayed as £0.0 - £5,000,000.0 with a trailing zero.
I have change the number format code from:
format: wNumb({
decimals: 1
})
to:
format: wNumb({
decimals: 0,
thousand: ','
})
Now this price is being displayed as £ 0 - £ 5,000,000 which is what I want.
The problem now is when doing a search the price in the url is displaying the ascii encoding for a comma %2C and it's not filtering the search results
adv_filter_price_min=0&adv_filter_price_max=5%2C000%2C000
How can I get it so the ascii encoding is not used in the url? eg:
adv_filter_price_min=0&adv_filter_price_max=5000000
Many Thanks
S
Full Code
var rangeslider = jQuery('.rangeslider');
var rangecontainer = rangeslider.parent('.rangeslidercontainer');
var txtlowprice = rangecontainer.children('.adv_filter_price_min');
var txthiprice = rangecontainer.children('.adv_filter_price_max');
var spnlowprice = rangecontainer.find('.text_price_min');
var spnhiprice = rangecontainer.find('.text_price_max');
var defminprice = Number(interfeis_var.search_minprice);
var defmaxprice = Number(interfeis_var.search_maxprice);
var hdnminprice = txtlowprice;
var hdnmaxprice = txthiprice;
var minprice = Number(hdnminprice.val());
var maxprice = Number(hdnmaxprice.val());
if(rangeslider.length){
rangeslider.noUiSlider({
start: [ minprice, maxprice ],
step: 10000,
range: {
'min': defminprice,
'max': defmaxprice
},
connect: true,
// Set some default formatting options.
// These options will be applied to any Link
// that doesn't overwrite these values.
format: wNumb({
decimals: 0
})
});
rangeslider.Link('lower').to(txtlowprice);
rangeslider.Link('upper').to(txthiprice);
rangeslider.Link('lower').to(spnlowprice, setFormat);
rangeslider.Link('upper').to(spnhiprice, setFormat);
}