From 6e4b178fa4ddb9357265da227f42315ea4d2f359 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 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15448 b9a71923-0436-4b27-9f14-aed3839534dd --- 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);