// categories multishop improved

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12638 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vChabot
2012-01-24 09:30:32 +00:00
parent 0d0e7f04c5
commit 988dd73596
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);