Merge pull request #6995 from atm-ph/fix_develop_search_product

Fix ajax search product is broken
This commit is contained in:
Laurent Destailleur
2017-06-13 15:01:18 +02:00
committed by GitHub

View File

@@ -182,8 +182,10 @@ else
$idprod = (! empty($match[0]) ? $match[0] : '');
if (GETPOST($htmlname,'alpha') == '' && (! $idprod || ! GETPOST($idprod,'alpha')))
{
print json_encode(array());
return;
}
// When used from jQuery, the search term is added as GET param "term".
$searchkey = (($idprod && GETPOST($idprod,'alpha')) ? GETPOST($idprod,'alpha') : (GETPOST($htmlname, 'alpha') ? GETPOST($htmlname, 'alpha') : ''));