[SOLVED] Error 1064 filter

  • Posts: 117
  • Thank you received: 3
10 years 3 weeks ago #177567

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.34

Hi, we have an error 1064 when we try to use the a filter.

We have created 2 filters: cursor and checkbox

Cursor filter work on custom product text field and if activated alone it works fine. Then we have created another filter, checkbox that works on another custom product field, in this case a multi-checkbox field.

When we activate the checkbox filter, both filters are correctly displayed but as soon as I select a value in the checkbox filter and filtering I got this error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OR b.test LIKE '1,%' OR b.test LIKE '%,1' OR b.test LIKE '%,1,%') ORDER BY a.ord' at line 1 SQL=SELECT DISTINCT b.* FROM XXXXX_hikashop_product_category AS a LEFT JOIN XXXXX_hikashop_product AS b ON a.product_id=b.product_id WHERE b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (12) AND (b.product_access = 'all' OR b.product_access LIKE '%,8,%') AND (b.test = '1' OR OR b.test LIKE '1,%' OR b.test LIKE '%,1' OR b.test LIKE '%,1,%') ORDER BY a.ordering ASC LIMIT 0, 20

What's the problem?

Last edit: 10 years 3 weeks ago by crealiagroup.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 3 weeks ago #177573

Hi,

Please edit the file "administrator/components/com_hikashop/classes/filter.php" and remplace

$fieldsList[] = 'b.'.$filter->filter_options['custom_field'].' =  '.$database->Quote($field).' OR ';
By
$fieldsList[] = 'b.'.$filter->filter_options['custom_field'].' =  '.$database->Quote($field);
We will fix the HikaShop package as soon as possible.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: webconcept

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

  • Posts: 117
  • Thank you received: 3
10 years 3 weeks ago #177594

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

Time to create page: 0.058 seconds
Powered by Kunena Forum