Fixed: The add new button disappear display type is not empty

This commit is contained in:
vishalsingh.qlo325
2024-09-25 10:43:26 +05:30
parent 589dd8305f
commit 2041f7a53b
43 changed files with 44 additions and 44 deletions

View File

@@ -278,7 +278,7 @@ class AdminCategoriesControllerCore extends AdminController
public function initToolbar()
{
if (empty($this->display)) {
if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') {
$this->toolbar_btn['new'] = array(
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token,
'desc' => $this->l('Add New')
@@ -317,7 +317,7 @@ class AdminCategoriesControllerCore extends AdminController
unset($this->toolbar_btn['new']);
}
// after adding a category
if (empty($this->display)) {
if ($this->display != 'edit' && $this->display != 'add' && $this->display !='view') {
$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,