From d2dc2bfde2568c9ce3853b3afd3d1b1d9e820b4e Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 27 Jul 2021 09:13:50 +0200 Subject: [PATCH] add hook product composition --- htdocs/product/composition/card.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 8459fa3e479..4bbcb7d6e27 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -50,6 +50,9 @@ $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); +// 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))