[-] BO : you can search a product by supplier reference again #PSCFV-5723

This commit is contained in:
DamienMetzger committed 2012-11-21 13:42:40 +01:00
1 parent 3255e75a89
commit b18f222c7f
1 file changed
+4 -1
+4 -1
View File
@@ -3219,7 +3219,10 @@ class ProductCore extends ObjectModel
); );
$sql->leftJoin('manufacturer', 'm', 'm.`id_manufacturer` = p.`id_manufacturer`'); $sql->leftJoin('manufacturer', 'm', 'm.`id_manufacturer` = p.`id_manufacturer`');
$where = 'pl.`name` LIKE \'%'.pSQL($query).'%\' OR p.`reference` LIKE \'%'.pSQL($query).'%\' OR p.`supplier_reference` LIKE \'%'.pSQL($query).'%\''; $where = 'pl.`name` LIKE \'%'.pSQL($query).'%\'
OR p.`reference` LIKE \'%'.pSQL($query).'%\'
OR p.`supplier_reference` LIKE \'%'.pSQL($query).'%\'
OR p.`id_product` IN (SELECT id_product FROM '._DB_PREFIX_.'product_supplier sp WHERE `product_supplier_reference` LIKE \'%'.pSQL($query).'%\')';
$sql->groupBy('`id_product`'); $sql->groupBy('`id_product`');
$sql->orderBy('pl.`name` ASC'); $sql->orderBy('pl.`name` ASC');