Free shipping for selected countries and/or shipping methods
This commit is contained in:
@@ -303,5 +303,17 @@ $(function($){
|
||||
});
|
||||
};
|
||||
|
||||
// Shipping conditions
|
||||
$('#is-removing-postage').change(function(ev) {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.free-postage-conditions').stop().slideDown();
|
||||
}
|
||||
else {
|
||||
$('.free-postage-conditions').stop().slideUp();
|
||||
}
|
||||
})
|
||||
|
||||
$.couponManager.onUsageUnlimitedChange();
|
||||
|
||||
$('#is-removing-postage').change();
|
||||
});
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="form-group">
|
||||
<label for="{$categories_field_name}-value">{intl l="The selected categories :"}</label>
|
||||
<select required multiple size="5" class="form-control" id="{$categories_field_name}-value" name="{$categories_field_name}[value][]">
|
||||
{loop type="category-tree" category=0 name="list-of-categories"}
|
||||
{loop type="category-tree" category=0 name="list-of-categories" backend_context=1}
|
||||
<option style="padding-left: {$LEVEL * 20}px" value="{$ID}" {if in_array($ID, $values)}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="form-group">
|
||||
<label for="{$products_field_name}-value">{intl l="The selected products :"}</label>
|
||||
<select required multiple size="5" class="form-control" id="{$products_field_name}-value" name="{$products_field_name}[value][]">
|
||||
{loop type="product" name="list-of-products" order="alpha"}
|
||||
{loop type="product" name="list-of-products" order="alpha" backend_context=1}
|
||||
<option value="{$ID}" {if in_array($ID, $values)}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="form-group">
|
||||
<label for="{$countries_field_name}-value">{intl l="The selected countries :"}</label>
|
||||
<select required multiple size="5" class="form-control" id="{$countries_field_name}-value" name="{$countries_field_name}[value][]">
|
||||
{loop type="country" name="list-of-countries" order="alpha"}
|
||||
{loop type="country" name="list-of-countries" order="alpha" backend_context=1}
|
||||
<option style="padding-left: {$LEVEL * 20}px" value="{$ID}" {if in_array($ID, $values)}selected="selected"{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="form-group">
|
||||
<label for="{$customers_field_name}-value">{intl l="The selected customer :"}</label>
|
||||
<select required multiple size="5" class="form-control" id="{$customers_field_name}-value" name="{$customers_field_name}[value][]">
|
||||
{loop type="customer" name="list-of-customers" order="lastname,firstname" current="0" backend_context="1"}
|
||||
{loop type="customer" name="list-of-customers" order="lastname,firstname" current="0" backend_context=1}
|
||||
<option value="{$ID}" {if in_array($ID, $values)}selected="selected"{/if}>{$LASTNAME} {$FIRSTNAME} {$REF}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
|
||||
@@ -123,10 +123,9 @@
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="for-countries-only">{intl l="Free shipping to countries :"}</label>
|
||||
<select multiple size="5" class="form-control" id="for-countries-only" name="{$name}">
|
||||
<option value="">{intl l="All countries"}</option>
|
||||
{loop type="country" name="list-of-countries" order="alpha" backend_context="1"}
|
||||
<option style="padding-left: {$LEVEL * 20}px" value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
{foreach $choices as $choice}
|
||||
<option value="{$choice->value}" {if in_array($choice->value, $value)}selected="selected"{/if}>{$choice->label}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<span class="label-help-block">{intl l='Use Ctrl+click to select (or deselect) more that one country'}</span>
|
||||
</div>
|
||||
@@ -136,16 +135,14 @@
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="for-modules-only">{intl l="Free shipping for methods :"}</label>
|
||||
<select multiple size="5" class="form-control" id="for-modules-only" name="{$name}">
|
||||
<option value="">{intl l="All shipping methods"}</option>
|
||||
{loop type="module" name="list-of-shipping-moddule" module_type=2 order=alpha backend_context=1}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
{foreach $choices as $choice}
|
||||
<option value="{$choice->value}" {if in_array($choice->value, $value)}selected="selected"{/if}>{$choice->label}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<span class="label-help-block">{intl l='Use Ctrl+click to select (or deselect) more that one shipping method'}</span>
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
Reference in New Issue
Block a user