Skip to content

Instantly share code, notes, and snippets.

@JumboLove
Created July 2, 2013 18:16
Show Gist options
  • Select an option

  • Save JumboLove/5911704 to your computer and use it in GitHub Desktop.

Select an option

Save JumboLove/5911704 to your computer and use it in GitHub Desktop.
Update mini cart with data
//Show updated mini-cart using data returned from the add to cart submission
function updateMiniCart(data){
jQuery.ajax({
type: 'POST',
url: serverData.showMiniCartUrl,
data: {lineItemId: data.result.lineItemId},
cache: false,
success: function(html){
app.minicart.show(html);
},
failure: function(data) {
showErrorMessages(errors);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment