Cursor Filter JQuery values

  • Posts: 2
  • Thank you received: 0
12 years 8 months ago #44615

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.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 7 months ago #44776

Thanks for the feedback.

I think that changing the code:

if(( isset($data) && !in_array($data,array(" ",'')))){
				 $data=explode(' - ',$data);
				$minVal=(int)@$data[0];
				$maxVal=(int)@$data[1];
			}
to
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.054 seconds
Powered by Kunena Forum