From 71b901e4e09d5998e3e75b93fbef6a3b7bef1602 Mon Sep 17 00:00:00 2001 From: vChabot Date: Sat, 19 May 2012 13:52:52 +0000 Subject: [PATCH] [-] BO : BugFix : #PSCFV-2441 : Shop creation : unable to save parameters --- controllers/admin/AdminShopController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php index 2e18526ba..4a2b1806f 100755 --- a/controllers/admin/AdminShopController.php +++ b/controllers/admin/AdminShopController.php @@ -255,7 +255,8 @@ class AdminShopControllerCore extends AdminController protected function afterUpdate($new_shop) { - Category::updateFromShop(Tools::getValue('categoryBox'), $new_shop->id); + if (!Category::updateFromShop(Tools::getValue('categoryBox'), $new_shop->id)) + $this->errors[] = $this->l('You need to select at least the root category.'); if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data)) $new_shop->copyShopData((int)Tools::getValue('importFromShop'), $import_data); return parent::afterUpdate($new_shop);