// Customers group

This commit is contained in:
Jerome Nadaud
2013-09-19 14:25:17 +02:00
parent cd627113b6
commit 15622fbf45
6 changed files with 123 additions and 17 deletions
@@ -31,7 +31,7 @@
{/if}
{if $input.type == 'text_customer' && !isset($customer)}
<label>{l s='Customer email'}</label>
<label class="control-label col-lg-3 required" for="email">{l s='Customer email'}</label>
{else}
{$smarty.block.parent}
{/if}
@@ -85,9 +85,8 @@
});
</script>
<div class="margin-form">
<input type="text" name="email" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}"/>
<sup>*</sup>
<div class="col-lg-9">
<input type="text" id="email" name="email" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}"/>
</div>
{/if}
{else}
@@ -179,18 +179,25 @@
</table>
<div style="display:none" id="group_discount_category_fancybox">
<fieldset>
<h3><i class="icon-group"></i>{l s='New group category discount'}</h3>
<div class="hintGroup">
{l s='Caution: The discount applied to a category does not stack with the overall reduction but instead replaces it.'}
<fieldset class="form-horizontal">
<div class="col-lg-12">
<h3><i class="icon-group"></i> {l s='New group category discount'}</h3>
<hr/>
<div class="alert alert-info">{l s='Caution: The discount applied to a category does not stack with the overall reduction but instead replaces it.'}</div>
{$categoryTreeView}
<div class="alert alert-warning">{l s='Only products that have this category as the default category will be affected.'}</div>
<div class="form-group">
<label class="control-label col-lg-3" for="category_reduction_fancybox">{l s='Discount (%):'}</label>
<div class="col-lg-9">
<input type="text" name="category_reduction_fancybox" id="category_reduction_fancybox" value="0.00" class="form-control" />
</div>
</div>
<div class="form-group">
<div class="col-lg-12">
<button type="button" onclick="addCategoryReduction();" class="btn btn-default pull-right">{l s='add'}</button>
</div>
</div>
</div>
{$categoryTreeView}
<div class="alert alert-warning">{l s='Only products that have this category as the default category will be affected.'}</div>
<label>{l s='Discount (%):'}</label>
<input type="text" name="category_reduction_fancybox" id="category_reduction_fancybox" value="0.00">
<button onclick="addCategoryReduction();" class="btn btn-primary">{l s='add'}</button>
</fieldset>
</div>
</div>
@@ -0,0 +1,35 @@
<?php
/*
* 2007-2013 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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-2013 PrestaShop SA
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Location: ../../../../../../../../');
exit;
@@ -0,0 +1,34 @@
{*
* 2007-2013 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-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<li class="tree-folder">
<span class="tree-folder-name{if isset($node['disabled']) && $node['disabled'] == true} tree-folder-name-disable{/if}">
<input type="radio" name="id_category" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="icon-folder-close"></i>
<label class="tree-toggler ">{$node['name']}</label>
</span>
<ul class="tree">
{$children}
</ul>
</li>
@@ -0,0 +1,31 @@
{*
* 2007-2013 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-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<li class="tree-item{if isset($node['disabled']) && $node['disabled'] == true} tree-item-disable{/if}">
<label class="tree-item-name">
<input type="radio" name="id_category" value="{$node['id_category']}"{if isset($node['disabled']) && $node['disabled'] == true} disabled="disabled"{/if} />
<i class="tree-dot"></i>
{$node['name']}
</label>
</li>
+2 -2
View File
@@ -312,8 +312,8 @@ class AdminGroupsControllerCore extends AdminController
$this->fields_value['reduction'] = isset($group->reduction) ? $group->reduction : 0;
$helper = new Helper();
$this->tpl_form_vars['categoryTreeView'] = $helper->renderCategoryTree(null, array(), 'id_category', true, false, array(), true, true);
$tree = new HelperTreeCategories('categories-tree');
$this->tpl_form_vars['categoryTreeView'] = $tree->render();
return parent::renderForm();
}