diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6e37d4fa9c3..7dc0dd871a8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -18,7 +18,8 @@ * Copyright (C) 2014 Alexandre Spangaro * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Frédéric France - * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018 Christophe Battarel * Copyright (C) 2018 Josep Lluis Amador * * This program is free software; you can redistribute it and/or modify @@ -2143,6 +2144,11 @@ class Form if ($i > 0) $sql.=" AND "; $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->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)."%'"; $sql.=")"; $i++;