Merge pull request #10227 from altatof/allow_ajax_search_on_product_desc
allow product ajax search on description
This commit is contained in:
commit
c128ecf7dc
@ -19,6 +19,7 @@
|
|||||||
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Christophe Battarel <christophe@altairis.fr>
|
||||||
* Copyright (C) 2018 Josep Lluis Amador <joseplluis@lliuretic.cat>
|
* Copyright (C) 2018 Josep Lluis Amador <joseplluis@lliuretic.cat>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -2143,6 +2144,11 @@ class Form
|
|||||||
if ($i > 0) $sql.=" AND ";
|
if ($i > 0) $sql.=" AND ";
|
||||||
$sql.="(p.ref LIKE '".$db->escape($prefix.$crit)."%' OR p.label LIKE '".$db->escape($prefix.$crit)."%'";
|
$sql.="(p.ref LIKE '".$db->escape($prefix.$crit)."%' OR p.label LIKE '".$db->escape($prefix.$crit)."%'";
|
||||||
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.=" OR pl.label LIKE '".$db->escape($prefix.$crit)."%'";
|
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.=" OR pl.label LIKE '".$db->escape($prefix.$crit)."%'";
|
||||||
|
if (!empty($conf->global->PRODUCT_AJAX_SEARCH_ON_DESCRIPTION))
|
||||||
|
{
|
||||||
|
$sql.=" OR p.description LIKE '".$db->escape($prefix.$crit)."%'";
|
||||||
|
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.=" OR pl.description LIKE '".$db->escape($prefix.$crit)."%'";
|
||||||
|
}
|
||||||
if (! empty($conf->global->MAIN_SEARCH_PRODUCT_BY_FOURN_REF)) $sql.=" OR pfp.ref_fourn LIKE '".$db->escape($prefix.$crit)."%'";
|
if (! empty($conf->global->MAIN_SEARCH_PRODUCT_BY_FOURN_REF)) $sql.=" OR pfp.ref_fourn LIKE '".$db->escape($prefix.$crit)."%'";
|
||||||
$sql.=")";
|
$sql.=")";
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user