Fix search by ref

This commit is contained in:
Juanjo Menent 2019-09-25 12:13:27 +02:00
parent b3c49f2ec8
commit b838ab0c31

View File

@ -52,7 +52,7 @@ elseif ($action=="search" && $term != '') {
$sql = 'SELECT * FROM '.MAIN_DB_PREFIX.'product';
$sql.= ' WHERE entity IN ('.getEntity('product').')';
$sql.= ' AND tosell = 1';
$sql.= natural_search(array('label','barcode'), $term);
$sql.= natural_search(array('ref','label','barcode'), $term);
$resql = $db->query($sql);
$rows = array();
while ($row = $db->fetch_array($resql)) {