Forums › Forums › Search & Filter Pro › Range – Slider not working
Tagged: range slider
- This topic has 12 replies, 2 voices, and was last updated 9 years, 8 months ago by Ross.
-
Anonymous(Private) March 23, 2015 at 5:26 am #13826
Hello,
I bought this product only for the range slider function and it is not working.
I am using it to filter a price range using a custom field’s post meta.
I have one listing as I test things out at the moment… priced at 2.00(tried 2 , $2.00 and $2 as field values as well).
The listing shows when filtered for 0 – 50. When I moved the slider from the 1-3 range, no results are found. When I filter 0 – 0, the item is displayed.
Here are some of my search form settings…
http://postimg.org/image/xob4slryt/
I also thought maybe the custom field meta wasnt being search so I added a plugin called Custom Fields Search and added the field but that did not fix the problem either.
I really dont want to ask for a refund. I really love your plugin. I just hope we are able to troubleshoot this problem! I will try whatever you ask me too.
Regards
Ross Moderator(Private) March 23, 2015 at 8:40 am #13834Hey Ryan
Ok so lets try a couple of things…
1) remove the other plugin you installed
2) create a new meta field, assign some values to a few posts (call it something else, and only enter values as whole numbers (ie2
,10
etc – no currency symbols and no decimal places).
3) create a new field in your search from for S&F – setup as range sliderLet me know when you have done this and if its working, if its not I’ll need to see a link in order to be able to help further.
Thanks
Ross Moderator(Private) March 24, 2015 at 1:12 pm #13910*edit* making this visible for any users with WCK
OK I can see the problem here
WCK is storing the meta data in a non standard way…
Basically, if you had a price meta field, you would expect the value of this field to only contain the price… but it does not..
Eg… Woocommerce adds a price custom field to all products, the data as an example would look like this if you did a
var_dump
like we did for your site:["_price"]=> array(1) { [0]=> string(1) "10" }
This means the price was set to 10.
What WCK is doing is this:
["rosstest"]=> array(1) { [0]=> string(40) "a:1:{i:0;a:1:{s:8:"rosstest";s:2:"10";}}" }
Notice in the first example we have
string(1) "10"
And in the test field I made for your site:
string(40) "a:1:{i:0;a:1:{s:8:"rosstest";s:2:"10";}}"
It is storing a lot of extra information in the field, such as the name as well as the value (and it’s serialising the data) – this makes it unsearchable – you can’t even use WP_Query to create a query on the meta data generated by that plugin – I personally think this is a very bad implementation – but I guess they may have solutions for this in their docs.
In this case, I would recommend to use the Advanced Custom Fields plugin – I’ve used it many times, and it stores meta data cleanly and doesn’t stop it from being searchable – I’m sure there are plenty of others, it just seems like WCK is making life difficult!
Hope that makes sense.
Thanks
-
AuthorPosts