Reply To: Range Slider Track 2 default

#8857
Ernest Marcinko
Ernest Marcinko
Keymaster

Hi!

It took me a while to figure this one out, but I found the problem. It only happens on values greater than 1000 (aka 4 digit). Basically the srcipt does a thousand separation, but it’s not reversed when re-printing the value, so it returns 1 instead or the lowest value.

I have a manual fix, it will require to change 2 lines in the plugin code. Open up the wp-content\plugins\ajax-search-pro\includes\views\asp.shortcode.custom_fields.php file and scroll to lines 170-171, where should be this:


        $_s_value_low = $style['_fo']['aspf'][$_field_name]['lower'] + 0;
        $_s_value_up = $style['_fo']['aspf'][$_field_name]['upper'] + 0;

And change that to this:


        $_s_value_low = preg_replace("/[^0-9\.]+/", "", $style['_fo']['aspf'][$_field_name]['lower']) + 0;
        $_s_value_up = preg_replace("/[^0-9\.]+/", "", $style['_fo']['aspf'][$_field_name]['upper']) + 0;

That should fix the problem. If you want me to make the change for you, feel free to post temporary FTP details, and I will do.

I hope this helps!

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)