[*] BO : shop restriction added to the cart rules
This commit is contained in:
@@ -179,4 +179,36 @@
|
||||
<a href="javascript:addProductRuleGroup();">
|
||||
<img src="../img/admin/add.gif" alt="{l s='Add'}" title="{l s='Add'}" /> {l s='Add a new rule group'}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{if $shops.unselected|@count + $shops.selected|@count > 1}
|
||||
<br />
|
||||
<input type="checkbox" id="shop_restriction" name="shop_restriction" value="1" {if $shops.unselected|@count}checked="checked"{/if} /> <strong>{l s='Shop selection'}</strong>
|
||||
<div id="shop_restriction_div" style="border:1px solid #AAAAAA;margin-top:10px;padding:0 10px 10px 10px;background-color:#FFF5D3">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p><strong>{l s='Selected shops'}</strong></p>
|
||||
<select name="shop_select[]" id="shop_select_2" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$shops.selected item='shop'}
|
||||
<option value="{$shop.id_shop|intval}"> {$shop.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="shop_select_remove">
|
||||
{l s='Remove'} >>
|
||||
</a>
|
||||
</td>
|
||||
<td style="padding-left:20px;">
|
||||
<p><strong>{l s='Unselected shops'}</strong></p>
|
||||
<select id="shop_select_1" style="border:1px solid #AAAAAA;width:400px;height:160px" multiple>
|
||||
{foreach from=$shops.unselected item='shop'}
|
||||
<option value="{$shop.id_shop|intval}"> {$shop.name}</option>
|
||||
{/foreach}
|
||||
</select><br /><br />
|
||||
<a style="text-align:center;display:block;border:1px solid #aaa;text-decoration:none;background-color:#fafafa;color:#123456;margin:2px;padding:2px" id="shop_select_add">
|
||||
<< {l s='Add'}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -28,6 +28,7 @@ function addProductRuleGroup()
|
||||
{
|
||||
product_rule_groups_counter += 1;
|
||||
product_rule_counters[product_rule_groups_counter] = 0;
|
||||
|
||||
$.get(
|
||||
'ajax-tab.php',
|
||||
{controller:'AdminCartRules',token:currentToken,newProductRuleGroup:1,product_rule_group_id:product_rule_groups_counter},
|
||||
@@ -93,7 +94,7 @@ function updateProductRuleShortDescription(item)
|
||||
$('#' + id2 + '_match').val(length);
|
||||
}
|
||||
|
||||
var restrictions = new Array('country', 'carrier', 'group', 'cart_rule');
|
||||
var restrictions = new Array('country', 'carrier', 'group', 'cart_rule', 'shop');
|
||||
for (i in restrictions)
|
||||
{
|
||||
toggleCartRuleFilter($('#' + restrictions[i] + '_restriction'));
|
||||
|
||||
Reference in New Issue
Block a user