Skip to content

Commit

Permalink
This could be a solution for magento#6207, use selected payment metho…
Browse files Browse the repository at this point in the history
…d to make id of checkout more unique.
  • Loading branch information
bka committed Aug 17, 2016
1 parent 903dcbb commit 9942c49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ define(
'ko',
'jquery',
'uiComponent',
'Magento_CheckoutAgreements/js/model/agreements-modal'
'Magento_CheckoutAgreements/js/model/agreements-modal',
'Magento_Checkout/js/model/quote'
],
function (ko, $, Component, agreementsModal) {
function (ko, $, Component, agreementsModal, quote) {
'use strict';
var checkoutConfig = window.checkoutConfig,
agreementManualMode = 1,
Expand All @@ -25,6 +26,10 @@ define(
modalContent: ko.observable(null),
modalWindow: null,

selectedPaymentMethod: function() {
return quote.paymentMethod() ? quote.paymentMethod().method : "";
},

/**
* Checks if agreement required
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="checkout-agreement">
<input type="checkbox"
data-bind="attr: {
'id': 'agreement_' + agreementId,
'id': 'agreement_' + $parent.selectedPaymentMethod() + '_' + agreementId,
'name': 'agreement[' + agreementId + ']',
'value': agreementId
}"
Expand Down

0 comments on commit 9942c49

Please sign in to comment.