News:

Looking for documentation? Take a look on our wiki

Main Menu

bug VM4.2.18 11050, J3.10.12

Started by Emma Iana, November 14, 2024, 22:16:05 PM

Previous topic - Next topic

Emma Iana

Hi,
I just found that
ajax.php for relatedproducts with more then one word ex: black hoodie prodces SQL below with error Column 'product_name' in where clause is ambiguous

SELECT p.virtuemart_product_id AS id,  CONCAT(IFNULL(l.product_name,ld.product_name), " [", p.product_sku, "]") AS value FROM `#__virtuemart_products` AS p 
 LEFT JOIN `#__virtuemart_products_pl_pl` as ld ON ld.`virtuemart_product_id` = p.`virtuemart_product_id`
 LEFT JOIN `#__virtuemart_products_en_gb` as l ON l.`virtuemart_product_id` = p.`virtuemart_product_id` WHERE l.`product_name` LIKE "%hoodie%" AND `product_name` LIKE "%black%" OR ld.`product_name` LIKE "%hoodie%" AND `product_name` LIKE "%black%" OR p.product_sku LIKE "%hoodie black%"


\administrator\components\com_virtuemart\controllers\ajax.php
case 'relatedproducts':
$fields = VmModel::joinLangLikeFields(array('product_name'),$filter);

Regards