diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 8ba38b81edb..38b9d060e7f 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -19,6 +19,7 @@
* Copyright (C) 2018 Ferran Marcet
* Copyright (C) 2018 Frédéric France
* Copyright (C) 2018 Nicolas ZABOURI
+ * Copyright (C) 2018 Christophe Battarel
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -2131,6 +2132,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++;