- Posts: 2
- Thank you received: 0
Cursor Filter JQuery values
14 years 6 months ago #44615
by lenki
Cursor Filter JQuery values was created 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
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.
14 years 6 months ago #44776
by nicolas
Replied by nicolas on topic Re: Cursor Filter JQuery values
Thanks for the feedback.
I think that changing the code:
to
should handle all the cases and solve the problem too in your case.
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];
}
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];
}
The following user(s) said Thank You: lenki
Please Log in or Create an account to join the conversation.
Time to create page: 0.150 seconds