[-] BO : BugFix : #PSCFV-2441 : Shop creation : unable to save parameters

This commit is contained in:
vChabot
2012-05-19 13:52:52 +00:00
parent 8a70039054
commit 71b901e4e0
+2 -1
View File
@@ -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);