[-] BO : BugFix : #PSFV-556 : Category problem - new category not properly assigned to root
This commit is contained in:
@@ -241,6 +241,15 @@ class AdminCategoriesControllerCore extends AdminController
|
|||||||
parent::initToolbar();
|
parent::initToolbar();
|
||||||
if ($this->_category->id == Category::getTopCategory()->id && isset($this->toolbar_btn['new']))
|
if ($this->_category->id == Category::getTopCategory()->id && isset($this->toolbar_btn['new']))
|
||||||
unset($this->toolbar_btn['new']);
|
unset($this->toolbar_btn['new']);
|
||||||
|
// after adding a category
|
||||||
|
if (empty($this->display))
|
||||||
|
{
|
||||||
|
$id_category = (Tools::isSubmit('id_category')) ? '&id_parent='.(int)Tools::getValue('id_category') : '';
|
||||||
|
$this->toolbar_btn['new'] = array(
|
||||||
|
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.$id_category,
|
||||||
|
'desc' => $this->l('Add new')
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initProcess()
|
public function initProcess()
|
||||||
|
|||||||
Reference in New Issue
Block a user