From 233018423247b91cbf550151d8fb4dcdd4842d07 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 14 Dec 2023 11:00:02 +0100 Subject: [PATCH] add hooks to product composition card --- htdocs/product/composition/card.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index f39df3b4085..f70639a6a05 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -389,6 +389,10 @@ if ($id > 0 || !empty($ref)) { if (isModEnabled('stock')) { print ''.$langs->trans('Stock').''; } + // Hook fields + $parameters = array(); + $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; // Qty in kit print ''.$langs->trans('Qty').''; // Stoc inc/dev @@ -467,6 +471,11 @@ if ($id > 0 || !empty($ref)) { print ''.$value['stock'].''; // Real stock } + // Hook fields + $parameters = array(); + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $productstatic); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Qty + IncDec if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { print ''; @@ -517,6 +526,11 @@ if ($id > 0 || !empty($ref)) { print ''; // Real stock } + // Hook fields + $parameters = array(); + $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $productstatic); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Qty in kit print ''.dol_escape_htmltag($value['nb']).'';