diff --git a/admin-dev/themes/template/categories/form.tpl b/admin-dev/themes/template/categories/form.tpl new file mode 100644 index 000000000..7ddd02be3 --- /dev/null +++ b/admin-dev/themes/template/categories/form.tpl @@ -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 +* @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')} +

+ {$input.info_introduction}
+ {$input.unidentified}
+ {$input.guest}
+ {$input.customer}
+





+ {/if} +{/block} diff --git a/controllers/admin/AdminCategoriesController.php b/controllers/admin/AdminCategoriesController.php index efc90314f..a0e243986 100644 --- a/controllers/admin/AdminCategoriesController.php +++ b/controllers/admin/AdminCategoriesController.php @@ -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.'), "".$unidentified->name[$this->context->language->id].""); + $guest_group_information = sprintf($this->l('%s - This group is for the guest customers. They have ordered a cart as guest.'), "".$guest->name[$this->context->language->id].""); + $default_group_information = sprintf($this->l('%s - This group is the default group customer.'), "".$default->name[$this->context->language->id].""); $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') ) ), diff --git a/controllers/admin/AdminGroupsController.php b/controllers/admin/AdminGroupsController.php index 84a6456aa..e202d3ff0 100644 --- a/controllers/admin/AdminGroupsController.php +++ b/controllers/admin/AdminGroupsController.php @@ -464,4 +464,21 @@ class AdminGroupsControllerCore extends AdminController '.($group->show_prices ? '' : ''). ''; } + + 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.'), "".$unidentified->name[$this->context->language->id].""); + $guest_group_information = sprintf($this->l('%s - This group is for the guest customers. They have ordered a cart as guest.'), "".$guest->name[$this->context->language->id].""); + $default_group_information = sprintf($this->l('%s - This group is the default group customer.'), "".$default->name[$this->context->language->id].""); + + $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(); + } }