[*] BO : Adding hook on AdminProducts

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12757 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
fSerny
2012-01-27 14:45:35 +00:00
parent 113d3a5174
commit 818ec1b476
@@ -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"