Skip to content

Commit

Permalink
ENGCOM-1818: [Forwardport] Prevent multiple add-to-cart initializatio…
Browse files Browse the repository at this point in the history
…ns in case of ajax loaded product listing #15748
  • Loading branch information
VladimirZaets authored Jun 5, 2018
2 parents b87018a + 10955cd commit afb3f78
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ define([
_bindSubmit: function () {
var self = this;

if (this.element.data('catalog-addtocart-initialized')) {
return;
}

this.element.data('catalog-addtocart-initialized', 1);
this.element.on('submit', function (e) {
e.preventDefault();
self.submitForm($(this));
Expand Down

0 comments on commit afb3f78

Please sign in to comment.