@@ -101,11 +101,15 @@
|
|||||||
<form action="{url path="/cart/update"}" class="form-inline" method="post">
|
<form action="{url path="/cart/update"}" class="form-inline" method="post">
|
||||||
<input type="hidden" name="cart_item" value="{$ITEM_ID}">
|
<input type="hidden" name="cart_item" value="{$ITEM_ID}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
{if $STOCK <= 500}
|
||||||
<select name="quantity" class="form-control" >
|
<select name="quantity" class="form-control" >
|
||||||
{for $will=1 to $STOCK}
|
{for $will=1 to $STOCK}
|
||||||
<option {if $QUANTITY == $will}selected="selected"{/if}>{$will}</option>
|
<option {if $QUANTITY == $will}selected="selected"{/if}>{$will}</option>
|
||||||
{/for}
|
{/for}
|
||||||
</select>
|
</select>
|
||||||
|
{else}
|
||||||
|
<input name="quantity" class="form-control" type="number" min="1" max="{$STOCK}" value ="{$QUANTITY}">
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" title="{intl l="Update Quantity"}" class="btn btn-cart-update">{intl l="+"}</button>
|
<button type="submit" title="{intl l="Update Quantity"}" class="btn btn-cart-update">{intl l="+"}</button>
|
||||||
</form>
|
</form>
|
||||||
@@ -209,6 +213,9 @@
|
|||||||
$("select[name=quantity]").change(function(){
|
$("select[name=quantity]").change(function(){
|
||||||
$(this).parents('form').submit();
|
$(this).parents('form').submit();
|
||||||
});
|
});
|
||||||
|
$("input[name=quantity]").change(function(){
|
||||||
|
$(this).parents('form').submit();
|
||||||
|
});
|
||||||
$(".btn-change-country").click(function(e){
|
$(".btn-change-country").click(function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var $form = $(this).parents('form');
|
var $form = $(this).parents('form');
|
||||||
|
|||||||
Reference in New Issue
Block a user