From 1d680976e8930c5cf4a0fcdfac00ebf6156581d7 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Wed, 22 Aug 2012 09:36:06 +0000 Subject: [PATCH] [-] BO: Fix #PSCFV-3711 --- controllers/admin/AdminShopController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php index a334b4fbf..20bd3ac03 100755 --- a/controllers/admin/AdminShopController.php +++ b/controllers/admin/AdminShopController.php @@ -557,11 +557,12 @@ class AdminShopControllerCore extends AdminController */ public function processAdd() { - if (!Tools::getValue('categoryBox')) + if (!Tools::getValue('categoryBox') || !in_array(Tools::getValue('id_category'), Tools::getValue('categoryBox'))) $this->errors[] = $this->l('You need to select at least the root category.'); - + if (Tools::isSubmit('id_category_default')) $_POST['id_category'] = (int)Tools::getValue('id_category_default'); + /* Checking fields validity */ $this->validateRules();