From 50b65b41fd5d7e8db805e1986709c8dcd37c6521 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Thu, 12 Jan 2012 14:23:24 +0000 Subject: [PATCH] [-] BO : #PSTEST-400 - Fixed bug with attribute value we cannot register --- controllers/admin/AdminAttributesGroupsController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php index ac9246395..2e04ca5d1 100644 --- a/controllers/admin/AdminAttributesGroupsController.php +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -31,6 +31,7 @@ class AdminAttributesGroupsControllerCore extends AdminController { $this->context = Context::getContext(); $this->table = 'attribute_group'; + $this->identifier = 'id_attribute_group'; $this->className = 'AttributeGroup'; $this->lang = true; $this->_defaultOrderBy = 'position'; @@ -161,6 +162,7 @@ class AdminAttributesGroupsControllerCore extends AdminController public function renderForm() { $this->table = 'attribute_group'; + $this->identifier = 'id_attribute_group'; $group_type = array( array( @@ -243,6 +245,7 @@ class AdminAttributesGroupsControllerCore extends AdminController $attributes_groups = AttributeGroup::getAttributesGroups($this->context->language->id); $this->table = 'attribute'; + $this->identifier = 'id_attribute'; $this->fields_form = array( 'legend' => array( @@ -507,6 +510,11 @@ class AdminAttributesGroupsControllerCore extends AdminController */ public function processSave($token) { + if ($this->display == 'add') + $this->identifier = 'id_attribute_group'; + else + $this->identifier = 'id_attribute_group'; + if ((int)Tools::getValue('id_attribute') <= 0 && $this->display == 'add' || (int)Tools::getValue('id_attribute_group') <= 0 && $this->display != 'add') return $this->processAdd($token);