[*] BO : Adding hook on AdminProducts
This commit is contained in:
@@ -162,6 +162,16 @@ class AdminProductsControllerCore extends AdminController
|
||||
'Accounting' => $this->l('Accounting')
|
||||
);
|
||||
|
||||
|
||||
/* Adding tab if modules are hooked */
|
||||
$modules_list = Hook::getHookModuleExecList('displayAdminProductsExtra');
|
||||
if (is_array($modules_list) && count($modules_list) > 0)
|
||||
{
|
||||
$this->available_tabs['Others'] = 23;
|
||||
$this->available_tabs_lang['Others'] = $this->l('Others');
|
||||
}
|
||||
|
||||
|
||||
/* Join categories table */
|
||||
if ($id_category = (int)Tools::getValue('productFilter_cl!name'))
|
||||
{
|
||||
@@ -3763,6 +3773,17 @@ class AdminProductsControllerCore extends AdminController
|
||||
$this->tpl_form_vars['input_namepack_items'] = $input_namepack_items;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* AdminProducts display hook
|
||||
*/
|
||||
public function initFormOthers($obj)
|
||||
{
|
||||
$this->tpl_form_vars['custom_form'] = hook::exec('displayAdminProductsExtra');
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* delete all items in pack, then check if type_product value is 2.
|
||||
* if yes, add the pack items from input "inputPackItems"
|
||||
|
||||
Reference in New Issue
Block a user