VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: binary on July 17, 2012, 20:02:39 PM

Title: WHERE IS the search function SQL Query created in code?
Post by: binary on July 17, 2012, 20:02:39 PM
Where can I find the search function code?

I'm getting this nice error that I'd like to fix:

500 - JDatabaseMySQL::query: 1054 - Unknown column 'p.category_name' in 'where clause' SQL=SELECT SQL_CALC_FOUND_ROWS * FROM `jos_virtuemart_products_en_gb` as l JOIN `jos_virtuemart_products` AS p using (`virtuemart_product_id`) LEFT JOIN `jos_virtuemart_product_shoppergroups` ON p.`virtuemart_product_id` = `jos_virtuemart_product_shoppergroups`.`virtuemart_product_id` LEFT OUTER JOIN `jos_virtuemart_shoppergroups` as s ON s.`virtuemart_shoppergroup_id` = `jos_virtuemart_product_shoppergroups`.`virtuemart_shoppergroup_id` WHERE (`p`.`product_sku` LIKE "%cow%" OR `p`.`category_name` LIKE "%cow%" OR `p`.`category_description` LIKE "%cow%" OR `p`.`mf_name` LIKE "%cow%" OR `p`.`product_name` LIKE "%cow%" OR `p`.`product_s_desc` LIKE "%cow%" AND p.`published`="1" AND (s.`virtuemart_shoppergroup_id`= "7" OR (s.`virtuemart_shoppergroup_id`) IS NULL )) group by p.`virtuemart_product_id` ORDER BY p.virtuemart_product_id ASC LIMIT 0, 10

I want to disable some of the columns it's searching for the keyword, such as category_name, etc.

I've been looking through the code forever and can't seem to find where it is generating this SQL query.

Thanks,
Title: Re: WHERE IS the search function SQL Query created in code?
Post by: ivus on July 18, 2012, 07:31:53 AM
where are you seeing this error?