NEW add hook selectProductsListWhere in select_produits_list function

This commit is contained in:
Regis Houssin 2022-03-17 09:32:45 +01:00
parent c6338e0de0
commit b0fe8994e4

View File

@ -2607,6 +2607,10 @@ class Form
} elseif (empty($conf->service->enabled)) { // when service module is disabled, show products only
$sql .= " AND p.fk_product_type = 0";
}
// Add where from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('selectProductsListWhere', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
// Add criteria on ref/label
if ($filterkey != '') {
$sql .= ' AND (';