// Fix displaying of customer group on admincustomers

This commit is contained in:
rGaillard
2012-02-03 15:59:32 +00:00
parent b86e535d39
commit a2aeff5436

View File

@@ -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')))