// categories association for product with multishop and context

This commit is contained in:
vChabot
2012-04-18 08:48:42 +00:00
parent 3e4c309703
commit f39b0a6b24
2 changed files with 22 additions and 7 deletions
@@ -2692,13 +2692,18 @@ class AdminProductsControllerCore extends AdminController
$tab_root = array('id_category' => $root->id, 'name' => $root->name);
$helper = new Helper();
if (Shop::getContext() != Shop::CONTEXT_SHOP)
$category_tree = $this->l('You must select a shop if you want to put your product into a particular shop.');
else
$category_tree = $helper->renderCategoryTree($tab_root, $selected_cat, 'categoryBox', false, true);
$data->assign(array('default_category' => $default_category,
'selected_cat_ids' => implode(',', array_keys($selected_cat)),
'selected_cat' => $selected_cat,
'id_category_default' => $product->getDefaultCategory(),
'category_tree' => $helper->renderCategoryTree($tab_root, $selected_cat, 'categoryBox', false, true),
'category_tree' => $category_tree,
'product' => $product,
'link' => $this->context->link
'link' => $this->context->link,
'is_shop_context' => Shop::getContext() == Shop::CONTEXT_SHOP
));
$this->tpl_form_vars['custom_form'] = $data->fetch();