diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index e1250f10cb3..e2539dae31c 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -51,6 +51,9 @@ if (!empty($user->socid)) { $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('productcompositioncard', 'globalcard')); + $object = new Product($db); $objectid = 0; if ($id > 0 || !empty($ref)) { diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 6929c70a5ff..3e7d9045dc8 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -59,6 +59,9 @@ if (!empty($user->socid)) { $fieldvalue = (!empty($id) ? $id : $ref); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('productstatscard', 'globalcard')); + $tmp = dol_getdate(dol_now()); $currentyear = $tmp['year']; if (empty($search_year)) {