VirtueMart Forum

VirtueMart 2 + 3 + 4 => Frontend Modules => Topic started by: lostmail on November 13, 2016, 09:39:06 AM

Title: Problem with search module
Post by: lostmail on November 13, 2016, 09:39:06 AM
Just see here:
I have a product with title: Halterahmen Spiegelglas "Trapezspiegel"
When i search for Trapezspiegel i get a seacht result and when i click the result link i get this error message:

Quote1064 - 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 'Trapezspiegel"" ORDER BY product_name DESC, `virtuemart_product_id` DESC LIMIT ' at line 1 SQL=SELECT p.`virtuemart_product_id`, `l`.`product_name`,`l`.product_name FROM `#__virtuemart_products` as p INNER JOIN `#__virtuemart_products_de_de` as l using (`virtuemart_product_id`) LEFT JOIN `#__virtuemart_product_shoppergroups` as ps ON p.`virtuemart_product_id` = `ps`.`virtuemart_product_id` LEFT JOIN `#__virtuemart_product_categories` as pc ON p.`virtuemart_product_id` = `pc`.`virtuemart_product_id` WHERE ( `pc`.`virtuemart_category_id` = 10 AND ( `ps`.`virtuemart_shoppergroup_id`= "1" OR `ps`.`virtuemart_shoppergroup_id` IS NULL ) AND p.`published`="1" ) AND p.`virtuemart_product_id`!="374" AND `l`.product_name <= "Halterahmen Spiegelglas "Trapezspiegel"" ORDER BY product_name DESC, `virtuemart_product_id` DESC LIMIT 1

It`s always a problem when i use " in Title of products.
Title: Re: Problem with search module
Post by: jjk on November 22, 2016, 00:07:12 AM
You can try one or two single quotes (einfaches Anführungszeichen) instead of the double quotes or the html entity for double quote (&quot;). If that doesn't work I would suggest to use
Halterahmen Spiegelglas - Trapezspiegel.