Remove js-update-quantity class
This commit is contained in:
@@ -100,7 +100,7 @@
|
|||||||
<div class="form-group group-qty">
|
<div class="form-group group-qty">
|
||||||
<form action="{url path="/cart/update"}" method="post" role="form">
|
<form action="{url path="/cart/update"}" method="post" role="form">
|
||||||
<input type="hidden" name="cart_item" value="{$ITEM_ID}">
|
<input type="hidden" name="cart_item" value="{$ITEM_ID}">
|
||||||
<select name="quantity" class="form-control js-update-quantity">
|
<select name="quantity" class="form-control" onchange="jQuery(this).parent('form').submit();">
|
||||||
{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}
|
||||||
@@ -158,16 +158,4 @@
|
|||||||
{/ifloop}
|
{/ifloop}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
|
||||||
|
|
||||||
{block name="javascript-initialization"}
|
|
||||||
<script type="text/javascript">
|
|
||||||
jQuery(function($cart) {
|
|
||||||
$cart('.js-update-quantity').on('change', function(e) {
|
|
||||||
var newQuantity = $cart(this).val();
|
|
||||||
|
|
||||||
$cart(this).parent().submit();
|
|
||||||
})
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{/block}
|
{/block}
|
||||||
Reference in New Issue
Block a user