Skip to content

Commit

Permalink
ENGCOM-4178: disable add to cart until page load #21007
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov authored Feb 13, 2019
2 parents 3a46d6b + 6566d3c commit 9e74d69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<button type="submit"
title="<?= /* @escapeNotVerified */ $buttonTitle ?>"
class="action primary tocart"
id="product-addtocart-button">
id="product-addtocart-button" disabled>
<span><?= /* @escapeNotVerified */ $buttonTitle ?></span>
</button>
<?= $block->getChildHtml('', true) ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ define([
$.widget('mage.productValidate', {
options: {
bindSubmit: false,
radioCheckboxClosest: '.nested'
radioCheckboxClosest: '.nested',
addToCartButtonSelector: '.action.tocart'
},

/**
Expand Down Expand Up @@ -41,6 +42,7 @@ define([
return false;
}
});
$(this.options.addToCartButtonSelector).attr('disabled', false);
}
});

Expand Down

0 comments on commit 9e74d69

Please sign in to comment.