Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Range Slider Track 2 default
This topic contains 2 replies, has 2 voices, and was last updated by romain 7 years, 10 months ago.
- AuthorPosts
- June 1, 2016 at 5:29 pm #8833
Hello
I’ve set the type of a custom field to “range slider”, for historical dates.
https://www.graphikarbre.com/temp/nexter/wp-content/themes/enfold-child/img/customField.pngOn my search page, if I type a keyword and hit enter, the results appear at bottom, good.
The search options are still visible, good for new search.
But the “Track 2 default” cursor of “historical date” has moved to “Track 1 default”.
https://www.graphikarbre.com/temp/nexter/wp-content/themes/enfold-child/img/customField2.pngIt’s a problem, because if I perform another search, and if I don’t see this buging cursor, there is no result…
Any solution ?
Thanx a lot- This topic was modified 7 years, 11 months ago by romain.
June 3, 2016 at 8:17 am #8857Hi!
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 :)
June 3, 2016 at 8:28 am #8858So sweat ! it’s working for me !
Thank you 😉 - AuthorPosts
The topic ‘Range Slider Track 2 default’ is closed to new replies.