[-] BO: it is now possible to change the default customer/guest/visitor group per shop

This commit is contained in:
Rémi Gaillard
2013-03-26 11:45:23 +01:00
parent 70bc9b7f6e
commit 1fd9fd1bfc

View File

@@ -90,6 +90,41 @@ class AdminGroupsControllerCore extends AdminController
WHERE jc.`deleted` != 1
'.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).'
AND jcg.`id_group` = a.`id_group`) AS nb';
$groups = Group::getGroups(Context::getContext()->language->id, true);
if (Shop::isFeatureActive())
$this->fields_options = array(
'general' => array(
'title' => $this->l('Default groups options'),
'fields' => array(
'PS_UNIDENTIFIED_GROUP' => array(
'title' => $this->l('Visitors group:'),
'desc' => $this->l('The group defined for your un-identified visitors'),
'cast' => 'intval',
'type' => 'select',
'list' => $groups,
'identifier' => 'id_group'
),
'PS_GUEST_GROUP' => array(
'title' => $this->l('Guests group:'),
'desc' => $this->l('The group defined for your identified guest customers (used in guest checkout)'),
'cast' => 'intval',
'type' => 'select',
'list' => $groups,
'identifier' => 'id_group'
),
'PS_CUSTOMER_GROUP' => array(
'title' => $this->l('Customers group:'),
'desc' => $this->l('The group defined for your identified customers'),
'cast' => 'intval',
'type' => 'select',
'list' => $groups,
'identifier' => 'id_group'
),
),
'submit' => array()
),
);
}
public function setMedia()