Skip to content

Commit

Permalink
NEW - Add a new hook on order list (Dolibarr#31315)
Browse files Browse the repository at this point in the history
* Add a new hook on order list

* pr correction
  • Loading branch information
atm-lucasmantegari authored Oct 11, 2024
1 parent 40965b6 commit 1e64870
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions htdocs/commande/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -2566,6 +2566,21 @@
}
}
}

// Call Hook modifyTextInfo
$parameters = array('textinfo' => $text_info);
$reshook = $hookmanager->executeHooks('modifyTextInfo', $parameters, $object, $action);
if ($reshook == 1) {
// for add information
$text_info .= $hookmanager->resPrint;
} elseif ($reshook == 0) {
// for replace information
$text_info = $hookmanager->resPrint;
} elseif ($reshook == -1) {
// for errors
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}

if ($notshippable == 0) {
$text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'green paddingleft');
$text_info = $text_icon.' '.$langs->trans('Shippable').'<br>'.$text_info;
Expand Down

0 comments on commit 1e64870

Please sign in to comment.