//correct errors in norms
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9044 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
018cd09251
commit
13607b185b
1 file changed
+13
-13
@@ -54,7 +54,7 @@ class AdminGroupShopControllerCore extends AdminController
|
|||||||
|
|
||||||
public function postProcess()
|
public function postProcess()
|
||||||
{
|
{
|
||||||
if (Tools::isSubmit('delete'.$this->table) OR Tools::isSubmit('status') OR Tools::isSubmit('status'.$this->table))
|
if (Tools::isSubmit('delete'.$this->table) || Tools::isSubmit('status') || Tools::isSubmit('status'.$this->table))
|
||||||
{
|
{
|
||||||
$object = $this->loadObject();
|
$object = $this->loadObject();
|
||||||
if (GroupShop::getTotalGroupShops() == 1)
|
if (GroupShop::getTotalGroupShops() == 1)
|
||||||
@@ -62,37 +62,37 @@ class AdminGroupShopControllerCore extends AdminController
|
|||||||
else if ($object->haveShops())
|
else if ($object->haveShops())
|
||||||
$this->_errors[] = Tools::displayError('You cannot delete or disable a groupshop which have this shops using it.');
|
$this->_errors[] = Tools::displayError('You cannot delete or disable a groupshop which have this shops using it.');
|
||||||
|
|
||||||
if (sizeof($this->_errors))
|
if (count($this->_errors))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return parent::postProcess();
|
return parent::postProcess();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterAdd($newGroupShop)
|
public function afterAdd($new_group_shop)
|
||||||
{
|
{
|
||||||
if (Tools::getValue('useImportData') && ($importData = Tools::getValue('importData')) && is_array($importData))
|
if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data))
|
||||||
$newGroupShop->copyGroupShopData(Tools::getValue('importFromShop'), $importData);
|
$new_group_shop->copyGroupShopData(Tools::getValue('importFromShop'), $import_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterUpdate($newGroupShop)
|
public function afterUpdate($new_group_shop)
|
||||||
{
|
{
|
||||||
if (Tools::getValue('useImportData') && ($importData = Tools::getValue('importData')) && is_array($importData))
|
if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data))
|
||||||
$newGroupShop->copyGroupShopData(Tools::getValue('importFromShop'), $importData);
|
$new_group_shop->copyGroupShopData(Tools::getValue('importFromShop'), $import_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function displayForm($isMainTab = true)
|
public function displayForm($is_main_tab = true)
|
||||||
{
|
{
|
||||||
parent::displayForm($isMainTab);
|
parent::displayForm($is_main_tab);
|
||||||
|
|
||||||
if (!($obj = $this->loadObject(true)))
|
if (!($obj = $this->loadObject(true)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Shop::getTotalShops() > 1 AND $obj->id)
|
if (Shop::getTotalShops() > 1 && $obj->id)
|
||||||
$disabled = 'disabled="disabled"';
|
$disabled = 'disabled="disabled"';
|
||||||
else
|
else
|
||||||
$disabled = '';
|
$disabled = '';
|
||||||
|
|
||||||
$importData = array(
|
$import_data = array(
|
||||||
'attribute_group' => $this->l('Attribute groups'),
|
'attribute_group' => $this->l('Attribute groups'),
|
||||||
'attribute' => $this->l('Attributes'),
|
'attribute' => $this->l('Attributes'),
|
||||||
//'customer_group' => $this->l('Customer groups'),
|
//'customer_group' => $this->l('Customer groups'),
|
||||||
@@ -115,7 +115,7 @@ class AdminGroupShopControllerCore extends AdminController
|
|||||||
'share_stock' => $this->getFieldValue($obj, 'share_stock') ? true : false,
|
'share_stock' => $this->getFieldValue($obj, 'share_stock') ? true : false,
|
||||||
'share_order' => $this->getFieldValue($obj, 'share_order') ? true : false,
|
'share_order' => $this->getFieldValue($obj, 'share_order') ? true : false,
|
||||||
'active' => $this->getFieldValue($obj, 'active') ? true : false,
|
'active' => $this->getFieldValue($obj, 'active') ? true : false,
|
||||||
'importData' => $importData,
|
'importData' => $import_data,
|
||||||
'getTree' => Shop::getTree(),
|
'getTree' => Shop::getTree(),
|
||||||
'checked' => (Tools::getValue('addgroup_shop') !== false) ? true : false,
|
'checked' => (Tools::getValue('addgroup_shop') !== false) ? true : false,
|
||||||
'defaultGroup' => Shop::getInstance(Configuration::get('PS_SHOP_DEFAULT'))->getGroupID()
|
'defaultGroup' => Shop::getInstance(Configuration::get('PS_SHOP_DEFAULT'))->getGroupID()
|
||||||
|
|||||||
Reference in new issue
Block a user