Skip to content

Instantly share code, notes, and snippets.

@rdallaire
Created September 9, 2013 23:26
Show Gist options
  • Select an option

  • Save rdallaire/6502878 to your computer and use it in GitHub Desktop.

Select an option

Save rdallaire/6502878 to your computer and use it in GitHub Desktop.
updateCart: function() {
console.log('update cart');
//
var items = $('ul.cart-line-items').find('li');
var itemsL = items.length;
var i = 0;
for(i; i < itemsL; i+=1) {
/* LID is different than the line item numbers
*
* */
var id = items[i].data('lid');
var qty = items[i].val();
$.Cart.updateLineItem(id, qty);
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment