Adding hooks on product stat in order to allow to expand stat on other modules
This commit is contained in:
parent
7e95c5ec20
commit
207dc1df55
@ -362,7 +362,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
{
|
{
|
||||||
global $conf, $langs, $user, $db;
|
global $conf, $langs, $user, $db;
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
$hookmanager->initHooks(array('productstats'));
|
||||||
$nblines = 0;
|
$nblines = 0;
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
@ -558,6 +558,10 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
$reshook = $hookmanager->executeHooks('addmoreproductstat', $parameters, $product); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
|
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
return $nblines++;
|
return $nblines++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user