fix updating product quantity in cart
This commit is contained in:
@@ -84,7 +84,7 @@
|
|||||||
{/loop}
|
{/loop}
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove"><i class="icon-trash"></i> {intl l="Remove"}</a>
|
<a href="{url path="/cart/delete/$ITEM_ID"}" class="btn btn-remove"><i class="icon-trash"></i> {intl l="Remove"}</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="unitprice">
|
<td class="unitprice">
|
||||||
{if $IS_PROMO == 1}
|
{if $IS_PROMO == 1}
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<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">
|
||||||
<select name="quantity" class="form-control" onchange="jQuery(this).parent('form').submit();">
|
<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}
|
||||||
@@ -162,3 +162,14 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
{block name="after-javascript-include"}
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$("select[name=quantity]").change(function(){
|
||||||
|
$(this).parents('form').submit();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user