Skip to main content

Cursor Filter JQuery values

More
14 years 6 months ago #44615 by lenki
Hi,

I am not 100% sure, but I think you might have a bug in the way you pass values to the jQuery script of cursor filter ($minVal and $maxVal). the values get filtered correctly, but they do not display well. The minimum value sets to 0 and the maximum sets to the $minVal. I checked the filter class and noticed that you use "explode(' - ',$values)", but the $values are already divided in array. When I uncomment rows 2445 - 2449 (version 1.5.7), everything works perfect.

However I must tell you, that this is really a great script. I really appretatiate the API functionality, which makes the cart so customisable without loosing the possibility to update:o)

Best Regards,
Lenka

Please Log in or Create an account to join the conversation.

More
14 years 6 months ago #44776 by nicolas
Thanks for the feedback.

I think that changing the code:
Code:
if(( isset($data) && !in_array($data,array(" ",'')))){ $data=explode(' - ',$data); $minVal=(int)@$data[0]; $maxVal=(int)@$data[1]; }
to
Code:
if( isset($data) && (is_array($data) || !in_array($data,array(" ",'')))){ if(!is_array($data)){ $data=explode(' - ',$data); } $minVal=(int)@$data[0]; $maxVal=(int)@$data[1]; }
should handle all the cases and solve the problem too in your case.
The following user(s) said Thank You: lenki

Please Log in or Create an account to join the conversation.

Time to create page: 0.164 seconds
Powered by Kunena Forum