[-] BO : #PSTEST-400 - Fixed problem with adding attribute
This commit is contained in:
1 parent
52540c840f
commit
89ee5dc5d0
2 files changed
+15
-5
No files matched your search
@@ -369,7 +369,12 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
parent::processAdd($token);
|
parent::processAdd($token);
|
||||||
|
|
||||||
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors))
|
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors))
|
||||||
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$token;
|
{
|
||||||
|
if ($this->display == 'add')
|
||||||
|
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$token;
|
||||||
|
else
|
||||||
|
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&id_attribute_group='.(int)Tools::getValue('id_attribute_group').'&conf=3&update'.$this->table.'&token='.$token;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -381,7 +386,12 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
parent::processUpdate($token);
|
parent::processUpdate($token);
|
||||||
|
|
||||||
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors))
|
if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors))
|
||||||
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$token;
|
{
|
||||||
|
if ($this->display == 'add')
|
||||||
|
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$token;
|
||||||
|
else
|
||||||
|
$this->redirect_after = self::$currentIndex.'&'.$this->identifier.'=&id_attribute_group='.(int)Tools::getValue('id_attribute_group').'&conf=3&update'.$this->table.'&token='.$token;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -513,7 +523,7 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
|||||||
if ($this->display == 'add')
|
if ($this->display == 'add')
|
||||||
$this->identifier = 'id_attribute_group';
|
$this->identifier = 'id_attribute_group';
|
||||||
else
|
else
|
||||||
$this->identifier = 'id_attribute_group';
|
$this->identifier = 'id_attribute';
|
||||||
|
|
||||||
if ((int)Tools::getValue('id_attribute_group') <= 0 && $this->display == 'add'
|
if ((int)Tools::getValue('id_attribute_group') <= 0 && $this->display == 'add'
|
||||||
|| (int)Tools::getValue('id_attribute') <= 0 && $this->display != 'add')
|
|| (int)Tools::getValue('id_attribute') <= 0 && $this->display != 'add')
|
||||||
|
|||||||
@@ -409,7 +409,7 @@ class AdminFeaturesControllerCore extends AdminController
|
|||||||
if (!$feature_value->update())
|
if (!$feature_value->update())
|
||||||
$this->errors[] = Tools::displayError('An error has occured: Can\'t save the current feature value');
|
$this->errors[] = Tools::displayError('An error has occured: Can\'t save the current feature value');
|
||||||
else if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors))
|
else if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors))
|
||||||
Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token);
|
Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'=&id_feature='.(int)Tools::getValue('id_feature').'&conf=3&update'.$this->table.'&token='.$this->token);
|
||||||
else
|
else
|
||||||
Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
|
Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
|
||||||
}
|
}
|
||||||
@@ -419,7 +419,7 @@ class AdminFeaturesControllerCore extends AdminController
|
|||||||
if (!$feature_value->add())
|
if (!$feature_value->add())
|
||||||
$this->errors[] = Tools::displayError('An error has occured: Can\'t save the current feature value');
|
$this->errors[] = Tools::displayError('An error has occured: Can\'t save the current feature value');
|
||||||
else if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors))
|
else if (Tools::isSubmit('submitAdd'.$this->table.'AndStay') && !count($this->errors))
|
||||||
Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'=&conf=3&update'.$this->table.'&token='.$this->token);
|
Tools::redirectAdmin(self::$currentIndex.'&'.$this->identifier.'=&id_feature='.(int)Tools::getValue('id_feature').'&conf=3&update'.$this->table.'&token='.$this->token);
|
||||||
else
|
else
|
||||||
Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
|
Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user