// 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:
@@ -0,0 +1,37 @@
|
|||||||
|
{*
|
||||||
|
* 2007-2011 PrestaShop
|
||||||
|
*
|
||||||
|
* NOTICE OF LICENSE
|
||||||
|
*
|
||||||
|
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||||
|
* that is bundled with this package in the file LICENSE.txt.
|
||||||
|
* It is also available through the world-wide-web at this URL:
|
||||||
|
* http://opensource.org/licenses/afl-3.0.php
|
||||||
|
* If you did not receive a copy of the license and are unable to
|
||||||
|
* obtain it through the world-wide-web, please send an email
|
||||||
|
* to license@prestashop.com so we can send you a copy immediately.
|
||||||
|
*
|
||||||
|
* DISCLAIMER
|
||||||
|
*
|
||||||
|
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||||
|
* versions in the future. If you wish to customize PrestaShop for your
|
||||||
|
* needs please refer to http://www.prestashop.com for more information.
|
||||||
|
*
|
||||||
|
* @author PrestaShop SA <contact@prestashop.com>
|
||||||
|
* @copyright 2007-2011 PrestaShop SA
|
||||||
|
* @version Release: $Revision: 8971 $
|
||||||
|
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||||
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
|
*}
|
||||||
|
{extends file="helper/form/form.tpl"}
|
||||||
|
|
||||||
|
{block name="end_field_block"}
|
||||||
|
{if ($input.name == 'groupBox')}
|
||||||
|
<p class="hint" style="display:block">
|
||||||
|
<span>{$input.info_introduction}</span><br />
|
||||||
|
<span>{$input.unidentified}</span><br />
|
||||||
|
<span>{$input.guest}</span><br />
|
||||||
|
<span>{$input.customer}</span><br />
|
||||||
|
</p><br /><br /><br /><br />
|
||||||
|
{/if}</div>
|
||||||
|
{/block}
|
||||||
@@ -171,6 +171,13 @@ class AdminCategoriesControllerCore extends AdminController
|
|||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
$obj = $this->loadObject(true);
|
$obj = $this->loadObject(true);
|
||||||
$selected_cat = array(isset($obj->id_parent) ? $obj->id_parent : Tools::getValue('id_parent', 1));
|
$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(
|
$this->fields_form = array(
|
||||||
'tinymce' => true,
|
'tinymce' => true,
|
||||||
@@ -277,6 +284,10 @@ class AdminCategoriesControllerCore extends AdminController
|
|||||||
'label' => $this->l('Group access:'),
|
'label' => $this->l('Group access:'),
|
||||||
'name' => 'groupBox',
|
'name' => 'groupBox',
|
||||||
'values' => Group::getGroups(Context::getContext()->language->id),
|
'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')
|
'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" />').
|
'.($group->show_prices ? '<img src="../img/admin/enabled.gif" />' : '<img src="../img/admin/disabled.gif" />').
|
||||||
'</a>';
|
'</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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user