Explorar o código

Hooks printFieldListTitle, printFieldListValue in product/composition/card.php to display columns with more info

Mathieu Moulin hai 1 ano
pai
achega
957e2e4838
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      htdocs/product/composition/card.php

+ 9 - 0
htdocs/product/composition/card.php

@@ -371,6 +371,10 @@ if ($id > 0 || !empty($ref)) {
 		if (!empty($conf->stock->enabled)) {
 			print '<td class="right">'.$langs->trans('Stock').'</td>';
 		}
+		// Other fields
+		$parameters = array();
+		$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
+		print $hookmanager->resPrint;
 		// Qty in kit
 		print '<td class="center">'.$langs->trans('Qty').'</td>';
 		// Stoc inc/dev
@@ -447,6 +451,11 @@ if ($id > 0 || !empty($ref)) {
 						print '<td class="right">'.$value['stock'].'</td>'; // Real stock
 					}
 
+					// Other fields
+					$parameters = array('value'=>&$value, 'prods_arbo'=>$prods_arbo);
+					$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
+					print $hookmanager->resPrint;
+
 					// Qty + IncDec
 					if ($user->rights->produit->creer || $user->rights->service->creer) {
 						print '<td class="center"><input type="text" value="'.$nb_of_subproduct.'" name="TProduct['.$productstatic->id.'][qty]" size="4" class="right" /></td>';