I was able to get the shopping cart total to automatically update when tabbing, clicking or entering on each line. This means you don't need the update button, which is unintuitive in my opinion. I did this with the following JQuery script, which seems like it should work as is in Phoenix, but does not:
Code: Select all
<script type="text/javascript">
$('input[name="cart_quantity[]"]').change(function() {
var f = $('form[name="cart_quantity"]');
$.ajax({url : $(f).attr('action'), type: 'POST', data: $(f).serialize()});
});
</script>
I have added this by hooking