Range Slider Track 2 default

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 romain 7 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8833
    romain
    romain
    Participant

    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.png

    On 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.png

    It’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 romain.
    #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 :)


    #8858
    romain
    romain
    Participant

    So sweat ! it’s working for me !
    Thank you 😉

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

The topic ‘Range Slider Track 2 default’ is closed to new replies.