From 1f50e074f7c862b6b983b8b8f882dbe805a8d997 Mon Sep 17 00:00:00 2001 From: Jerome Nadaud Date: Thu, 17 Oct 2013 09:37:19 +0200 Subject: [PATCH] // New order button fix --- controllers/admin/AdminOrdersController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 0caec015f..83c9bfe3f 100755 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -139,13 +139,17 @@ class AdminOrdersControllerCore extends AdminController public function initPageHeaderToolbar() { - if (empty($this->display) && Context::getContext()->shop->getContext() == Shop::CONTEXT_SHOP && isset($this->toolbar_btn['new']) && Shop::isFeatureActive()) + if (empty($this->display)) $this->page_header_toolbar_btn['new_order'] = array( 'href' => self::$currentIndex.'&addorder&token='.$this->token, 'desc' => $this->l('Add new order'), 'icon' => 'process-icon-new' ); + if (Context::getContext()->shop->getContext() != Shop::CONTEXT_SHOP && isset($this->toolbar_btn['new']) + && Shop::isFeatureActive()) + unset($this->page_header_toolbar_btn['new_order']); + parent::initPageHeaderToolbar(); }