From 1fd9fd1bfc01ad4585978dc91ddb7404fd1e2a01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Tue, 26 Mar 2013 11:45:23 +0100 Subject: [PATCH] [-] BO: it is now possible to change the default customer/guest/visitor group per shop --- controllers/admin/AdminGroupsController.php | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/controllers/admin/AdminGroupsController.php b/controllers/admin/AdminGroupsController.php index b33fbb7ac..a17063f88 100644 --- a/controllers/admin/AdminGroupsController.php +++ b/controllers/admin/AdminGroupsController.php @@ -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()