Skip to main content

filter product wrong results on minimum height

More
3 years 5 months ago #351123 by jouwnaambord.nl
-- HikaShop version -- : 4.7.2
-- Joomla version -- : 4.2.9
-- PHP version -- : 8.1

Hi,

I created a filter on the product height. It works fine for most of the values except for the minimum height. When selecting the filter "HOOGTEMAAT FILTER" with the filteroption "below 10 cm" the results show also the products with a height of 10 cm. See screenshots for example and settings for product and filter.

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

More
3 years 5 months ago #351126 by nicolas
Hi,

That's normal. The "below 10 cm" is actually a <=, not a < operation.

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

More
3 years 5 months ago #351166 by jouwnaambord.nl
Thanks, in which file can I change this?

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

More
3 years 5 months ago #351173 by nicolas
Hi,

I believe it is this code:
Code:
$limit=' ( '.$column.' ) BETWEEN '.(float)$values[0].' AND '.(float)$values[1].' ';
in the file administrator/components/com_hikashop/classes/filter.php
The "BETWEEN" condition in MySQL is inclusive:
stackoverflow.com/questions/5080824/mysq...clause-not-inclusive
And so, for "below 10", this code actually adds the condition "BETWEEN 0.0 AND 10.0"

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

Time to create page: 0.190 seconds
Powered by Kunena Forum