From 2e00c2ff001b9f2f78e41b9b064b88603fd26b6c Mon Sep 17 00:00:00 2001 From: rMalie Date: Mon, 21 May 2012 15:54:31 +0000 Subject: [PATCH] // Add a warning in adminProducts if we try to create a product in a shop where the product is not linked git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15536 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/admin/AdminProductsController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index c9bd55954..542a73ed6 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2190,6 +2190,9 @@ class AdminProductsControllerCore extends AdminController $product = $this->object; + if ($this->display == 'edit' && Shop::isFeatureActive() && Shop::getContext() == Shop::CONTEXT_SHOP && !$product->isAssociatedToShop($this->context->shop->id)) + $this->displayWarning($this->l('Warning: this product does not exist in this shop. If you submit the form, this product will be available for this shop too.')); + // Product for multishop $this->context->smarty->assign('bullet_common_field', ''); if (Shop::isFeatureActive() && $this->display == 'edit')