VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Pizda on July 08, 2013, 23:05:03 PM

Title: Bug with searching products by sku, description... in Admin Panel
Post by: Pizda on July 08, 2013, 23:05:03 PM
When I search product by sku, description, but no result.
Virtuemart 2.0.6

SQL Queries in debug mode:

SELECT SQL_CALC_FOUND_ROWS *
  FROM `qoj62_virtuemart_products_en_gb` as l JOIN `qoj62_virtuemart_products` AS p using (`virtuemart_product_id`)
  WHERE (`product_name` LIKE "%8D66D12033%")
  group by p.`virtuemart_product_id`
  ORDER BY p.`created_on` DESC
  LIMIT 0, 10
SELECT FOUND_ROWS()
SELECT SQL_CALC_FOUND_ROWS *
  FROM `qoj62_virtuemart_products_en_gb` as l JOIN `qoj62_virtuemart_products` AS p using (`virtuemart_product_id`)
  WHERE (`product_name` LIKE "%8D66D12033%")
  group by p.`virtuemart_product_id`
  ORDER BY p.`created_on` DESC
  LIMIT 0, 10
Title: Re: Bug with searching products by sku, description... in Admin Panel
Post by: jenkinhill on July 08, 2013, 23:28:49 PM
Why are you using such an old version of VirtueMart? It could be a bug in that version.  Versions before 2.0.10 are considered as insecure so updating is advised, 2.0.22 is about to be released.
Title: Re: Bug with searching products by sku, description... in Admin Panel
Post by: Pizda on July 09, 2013, 15:16:09 PM
Ok, my current version now is 2.0.20. Search on description about 1000 symbols not work.
Title: Re: Bug with searching products by sku, description... in Admin Panel
Post by: Pizda on July 09, 2013, 19:30:32 PM
Can help me with search description of products ?
Title: Re: Bug with searching products by sku, description... in Admin Panel
Post by: Pizda on July 10, 2013, 13:12:02 PM
Ok, its work for me:
I added product_desc to this line:
var $valid_BE_search_fields = array('product_name', 'product_sku', 'product_s_desc', [b]'product_desc[/b]', '`l`.`metadesc`');
Title: Re: Bug with searching products by sku, description... in Admin Panel
Post by: Milbo on July 10, 2013, 13:32:58 PM
yeh I think the performance hit was to big, we need to add an option, like we did for the users list