diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index 7e129a82e..afeea4937 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -241,6 +241,15 @@ class AdminCategoriesControllerCore extends AdminController parent::initToolbar(); if ($this->_category->id == Category::getTopCategory()->id && isset($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()