// categories multishop improved

This commit is contained in:
vChabot
2012-01-24 09:30:32 +00:00
parent e7e1f411ae
commit 7e0a2ce15e
5 changed files with 28 additions and 9 deletions
@@ -323,6 +323,7 @@ class AdminCategoriesControllerCore extends AdminController
'use_radio' => true,
'use_search' => false,
'disabled_categories' => array(4),
'top_category' => Category::getTopCategory(),
)
),
array(
@@ -407,6 +408,15 @@ class AdminCategoriesControllerCore extends AdminController
'class' => 'button'
)
);
if (Shop::isFeatureActive())
{
$this->fields_form['input'][] = array(
'type' => 'shop',
'label' => $this->l('Shop association:'),
'name' => 'checkBoxShopAsso',
'values' => Shop::getTree()
);
}
if (Tools::isSubmit('add'.$this->table.'root'))
unset($this->fields_form['input'][2],$this->fields_form['input'][3]);
@@ -2466,7 +2466,8 @@ class AdminProductsControllerCore extends AdminController
$product = $obj;
$data = $this->createTemplate($this->tpl_form);
// Prepare Categories tree for display in Associations tab
$default_category = Tools::getValue('id_category', 1);
$root = Category::getRootCategory();
$default_category = Tools::getValue('id_category', $root->id);
if (!$product->id)
$selected_cat = Category::getCategoryInformations(Tools::getValue('categoryBox', array($default_category)), $this->default_form_language);