Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Range slider not working
- This topic has 5 replies, 2 voices, and was last updated 10 years, 7 months ago by
Mayur Marwa.
-
AuthorPosts
-
October 19, 2015 at 9:18 am #6340
Mayur Marwa
ParticipantThe plugin works fine until I include a slider for custom field on the front end settings.
The issue can be found at:
http://dynamiccrane.visionkraftmwpl.com/manlifts/buy/As you will see in the page, the first instance is working properly.
But the second search with the slider doesn’t work.
(Both search forms have different shortcodes)I get the following error in the chrome dev tools:
Uncaught TypeError: $(…).noUiSlider is not a functionRequest you to look into the issue and suggest a solution.
Awaiting your response.Regards,
Mayur MarwaOctober 19, 2015 at 9:22 am #6342Ernest Marcinko
KeymasterHi!
Thanks for the issue report, I was not aware of it, and it looks like the latest version is affected.
To fix it go to the Compatibility Settings submenu and change the Javascript source option to either “Minified” or “Minified scoped”. One of them should solve the problem.
I will check what is causing it and fix it for the next release.
October 19, 2015 at 10:34 am #6346Mayur Marwa
ParticipantHi Ernest,
Appreciate the quick reply.
I changed the option to “Minified” and the slider has appeared.But it does not show any results.
I have a custom field of cust_height in my posts which I am using for the range filter. I have added this field into 2 of my posts. But the search says no results.Request you to investigate the issue.
October 19, 2015 at 11:15 am #6348Mayur Marwa
ParticipantHI,
I guess the custom field value is treated as a string.
By a little searching on wp forums I figured that:
The SQL query needs to have “meta_value+0” instead of “meta_value” in the query to return the data as numeric value.
If this is a possible solution, How do I implement this in the plugin?
If not, kindly suggest how to treat the custom field value as numeric so that the plugin searches correctly.October 19, 2015 at 3:09 pm #6349Ernest Marcinko
KeymasterHi!
The database does the casting automatically. The values are treated as numerics, as the queries uses a “BETWEEN” statement, which only works with numeric values, I don’t think this is the issue here.
Do you use another custom field selector by any chance? Checkbox or radio button? If so, then both criteria must match in order to display results.
October 19, 2015 at 7:45 pm #6359Mayur Marwa
ParticipantGreat! It works!
Thanks Ernest! -
AuthorPosts
- You must be logged in to reply to this topic.