Skip to content

Commit

Permalink
Skip cart validation if empty cart action is executed
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekn committed Mar 1, 2019
1 parent 13b0fe9 commit 7bb5dd4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ define([
return true;
}

var action = this.element.find('#update_cart_action_container').val();
if (action === 'empty_cart') {
return true;
}

if (this.isValid()) {
event.preventDefault();
this.validateItems(this.options.validationURL, this.element.serialize());
Expand Down

0 comments on commit 7bb5dd4

Please sign in to comment.