// BugFix : explain customer groups names with a hint

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11629 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
vChabot
2011-12-22 16:16:08 +00:00
parent beb8fff0be
commit f5ceaaf200
3 changed files with 65 additions and 0 deletions
@@ -171,6 +171,13 @@ class AdminCategoriesControllerCore extends AdminController
$this->initToolbar();
$obj = $this->loadObject(true);
$selected_cat = array(isset($obj->id_parent) ? $obj->id_parent : Tools::getValue('id_parent', 1));
$unidentified = new Group(Configuration::get('PS_UNIDENTIFIED_GROUP'));
$guest = new Group(Configuration::get('PS_GUEST_GROUP'));
$default = new Group(Configuration::get('PS_CUSTOMER_GROUP'));
$unidentified_group_information = sprintf($this->l('%s - This group is for visitors.'), "<b>".$unidentified->name[$this->context->language->id]."</b>");
$guest_group_information = sprintf($this->l('%s - This group is for the guest customers. They have ordered a cart as guest.'), "<b>".$guest->name[$this->context->language->id]."</b>");
$default_group_information = sprintf($this->l('%s - This group is the default group customer.'), "<b>".$default->name[$this->context->language->id]."</b>");
$this->fields_form = array(
'tinymce' => true,
@@ -277,6 +284,10 @@ class AdminCategoriesControllerCore extends AdminController
'label' => $this->l('Group access:'),
'name' => 'groupBox',
'values' => Group::getGroups(Context::getContext()->language->id),
'info_introduction' => $this->l('You have now three default customer groups.'),
'unidentified' => $unidentified_group_information,
'guest' => $guest_group_information,
'customer' => $default_group_information,
'desc' => $this->l('Mark all groups you want to give access to this category')
)
),
@@ -464,4 +464,21 @@ class AdminGroupsControllerCore extends AdminController
'.($group->show_prices ? '<img src="../img/admin/enabled.gif" />' : '<img src="../img/admin/disabled.gif" />').
'</a>';
}
public function renderList()
{
$unidentified = new Group(Configuration::get('PS_UNIDENTIFIED_GROUP'));
$guest = new Group(Configuration::get('PS_GUEST_GROUP'));
$default = new Group(Configuration::get('PS_CUSTOMER_GROUP'));
$unidentified_group_information = sprintf($this->l('%s - This group is for visitors.'), "<b>".$unidentified->name[$this->context->language->id]."</b>");
$guest_group_information = sprintf($this->l('%s - This group is for the guest customers. They have ordered a cart as guest.'), "<b>".$guest->name[$this->context->language->id]."</b>");
$default_group_information = sprintf($this->l('%s - This group is the default group customer.'), "<b>".$default->name[$this->context->language->id]."</b>");
$this->displayInformation($this->l('You have now three default customer groups.'));
$this->displayInformation($unidentified_group_information);
$this->displayInformation($guest_group_information);
$this->displayInformation($default_group_information);
return parent::renderList();
}
}