From 9a58359cb6649939bba1b68ca4c1adfa438902fb Mon Sep 17 00:00:00 2001 From: dSevere Date: Thu, 15 Dec 2011 17:36:54 +0000 Subject: [PATCH] // bug fix with suppliers and warehouses on product save action in back-office git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11286 b9a71923-0436-4b27-9f14-aed3839534dd --- admin-dev/themes/template/products/suppliers.tpl | 6 +++--- admin-dev/themes/template/products/warehouses.tpl | 6 +++--- controllers/admin/AdminProductsController.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/admin-dev/themes/template/products/suppliers.tpl b/admin-dev/themes/template/products/suppliers.tpl index 9c7d42f31..4c2ef8268 100644 --- a/admin-dev/themes/template/products/suppliers.tpl +++ b/admin-dev/themes/template/products/suppliers.tpl @@ -27,15 +27,15 @@ - + {if isset($product->id)}

{l s='Suppliers of the current product'}

diff --git a/admin-dev/themes/template/products/warehouses.tpl b/admin-dev/themes/template/products/warehouses.tpl index 6eb0e1ffc..510aaa2bc 100644 --- a/admin-dev/themes/template/products/warehouses.tpl +++ b/admin-dev/themes/template/products/warehouses.tpl @@ -27,15 +27,15 @@ - + {if isset($product->id)}

{l s='Product location in warehouses'}

diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 8dc57168d..c39e5f234 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2078,7 +2078,7 @@ class AdminProductsControllerCore extends AdminController */ public function processSuppliers($token) { - if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) + if (Tools::getValue('supplier_loaded') && Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) { // Get all id_product_attribute $attributes = $product->getAttributesResume($this->context->language->id); @@ -2256,7 +2256,7 @@ class AdminProductsControllerCore extends AdminController */ public function processWarehouses($token) { - if (Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) + if (Tools::getValue('warehouse_loaded') && Validate::isLoadedObject($product = new Product((int)Tools::getValue('id_product')))) { // Get all id_product_attribute $attributes = $product->getAttributesResume($this->context->language->id);