Skip to content

Commit

Permalink
chore: consolidate metadata attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
amihajlovski committed Sep 24, 2024
1 parent ede45f5 commit fe15869
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,19 @@
<div class="form-group">
<label class="form-title mb-0" for="expressPaymentsButton">Express Checkout</label>
<small id="expressPaymentsButtonHelp" class="form-text mb-1">Make sure the payment methods are also enabled in the Customer Area.</small>
<div class="row">
<div class="switch-button">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" name="ExpressPayments_enabled" id="expressPaymentsEnabledChecked" data-bs-toggle="collapse" data-bs-target=".express-settings" ${AdyenConfigs.areExpressPaymentsEnabled() ? 'checked': 'unchecked'}>
</div>
</div>
</div>
<label class="form-title mb-0" for="expressCheckoutHelp">Buttons display on cart and mini-cart page</label>
<small class="form-text mb-1">Customize the order that you would like to place the express buttons in the cart and mini-cart.</small>
</div>
<div class="express-settings collapse ${AdyenConfigs.areExpressPaymentsEnabled() ? 'show': ''}">
<div class="express-settings collapse show">
<div class="form-group">
<ul class="draggable-list" id="draggable-list"></ul>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="switch-button">
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" name="ExpressPayments_Pdp_enabled" id="expressPaymentsEnabledPdpChecked" data-bs-toggle="collapse" data-bs-target=".express-settings-pdp" ${AdyenConfigs.arePdpExpressPaymentsEnabled() ? 'checked': 'unchecked'}>
</div>
</div>
</div>
<label class="form-title mb-0" for="expressCheckoutHelp">Buttons display on product detail page</label>
<small class="form-text mb-1">Customize the order that you would like to place the express buttons in the product detail page.</small>
</div>
<div class="express-settings-pdp collapse ${AdyenConfigs.arePdpExpressPaymentsEnabled() ? 'show': ''}">
<div class="express-settings-pdp collapse show">
<div class="form-group">
<ul class="draggable-list" id="draggable-list-pdp"></ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ const adyenConfigsObj = {
},

areExpressPaymentsEnabled() {
return getCustomPreference('ExpressPayments_enabled');
return this.isApplePayExpressEnabled() || this.isAmazonPayExpressEnabled() || this.isPayPalExpressEnabled();
},

arePdpExpressPaymentsEnabled() {
return getCustomPreference('ExpressPayments_Pdp_enabled');
return this.isApplePayExpressOnPdpEnabled();
},

isApplePayExpressEnabled() {
Expand Down

0 comments on commit fe15869

Please sign in to comment.