// categories multishop improved
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user