From 2c918da8e9bcf07b5b4eae8e600f4978bdff8bc2 Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Thu, 20 Oct 2011 15:47:51 +0000 Subject: [PATCH] // fix add new product git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9518 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminProductsController.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 26fdaf755..d83e7e0f1 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -1727,13 +1727,14 @@ if (false) throw new Exception('object not loaded'); $smarty = $this->context->smarty; $product_tabs = array(); - foreach($this->available_tabs as $product_tab) - { - $product_tabs[$product_tab] = array( - 'name' => $product_tab, - 'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.Tools::getValue('id_product').'&action='.$product_tab, - ); - } + if(Tools::getValue('id_product')) + foreach($this->available_tabs as $product_tab) + { + $product_tabs[$product_tab] = array( + 'name' => $product_tab, + 'href' => $this->context->link->getAdminLink('AdminProducts').'&id_product='.Tools::getValue('id_product').'&action='.$product_tab, + ); + } $smarty->assign('product_tabs', $product_tabs); if ($id_category_back = (int)(Tools::getValue('id_category')))