From a2aeff5436d2fbf93e710e6f62733032ca2db2e2 Mon Sep 17 00:00:00 2001 From: rGaillard Date: Fri, 3 Feb 2012 15:59:32 +0000 Subject: [PATCH] // Fix displaying of customer group on admincustomers --- .../admin/AdminCustomersController.php | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/controllers/admin/AdminCustomersController.php b/controllers/admin/AdminCustomersController.php index 6003368d7..1af17f953 100644 --- a/controllers/admin/AdminCustomersController.php +++ b/controllers/admin/AdminCustomersController.php @@ -366,14 +366,6 @@ class AdminCustomersControllerCore extends AdminController ), 'desc' => $this->l('Customer will receive your ads via e-mail') ), - array( - 'type' => 'group', - 'label' => $this->l('Group access:'), - 'name' => 'groupBox', - 'values' => $groups, - 'required' => true, - 'desc' => $this->l('Check all the box(es) of groups of which the customer is to be a member') - ) ) ); @@ -387,19 +379,30 @@ class AdminCustomersControllerCore extends AdminController unset($groups[$key]); } - $this->fields_form['input'][] = - array( - 'type' => 'select', - 'label' => $this->l('Default group:'), - 'name' => 'id_default_group', - 'options' => array( - 'query' => $groups, - 'id' => 'id_group', - 'name' => 'name' - ), - 'hint' => $this->l('The group will be as applied by default.'), - 'desc' => $this->l('Apply the discount\'s price of this group.') - ); + $this->fields_form['input'] = array_merge($this->fields_form['input'], + array( + array( + 'type' => 'group', + 'label' => $this->l('Group access:'), + 'name' => 'groupBox', + 'values' => $groups, + 'required' => true, + 'desc' => $this->l('Check all the box(es) of groups of which the customer is to be a member') + ), + array( + 'type' => 'select', + 'label' => $this->l('Default group:'), + 'name' => 'id_default_group', + 'options' => array( + 'query' => $groups, + 'id' => 'id_group', + 'name' => 'name' + ), + 'hint' => $this->l('The group will be as applied by default.'), + 'desc' => $this->l('Apply the discount\'s price of this group.') + ) + ) + ); // if customer is a guest customer, password hasn't to be there if ($obj->id && ($obj->is_guest && $obj->id_default_group == Configuration::get('PS_GUEST_GROUP')))