diff --git a/CHANGELOG.md b/CHANGELOG.md index 0eb940c020..ac19602324 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Draft +- additional checkout buttons don't work on applying 100% discount coupon. [#2109](https://github.com/bigcommerce/cornerstone/pull/2109) - Fix sliding carousel with products cause footer headers flickering. [#2119](https://github.com/bigcommerce/cornerstone/pull/2119) diff --git a/assets/js/theme/cart.js b/assets/js/theme/cart.js index ad1e5d589e..d3e161c734 100644 --- a/assets/js/theme/cart.js +++ b/assets/js/theme/cart.js @@ -15,6 +15,7 @@ export default class Cart extends PageManager { this.$cartContent = $('[data-cart-content]'); this.$cartMessages = $('[data-cart-status]'); this.$cartTotals = $('[data-cart-totals]'); + this.$cartAdditionalCheckoutBtns = $('[data-cart-additional-checkout-buttons]'); this.$overlay = $('[data-cart] .loadingOverlay') .hide(); // TODO: temporary until roper pulls in his cart components this.$activeCartItemId = null; @@ -221,6 +222,7 @@ export default class Cart extends PageManager { totals: 'cart/totals', pageTitle: 'cart/page-title', statusMessages: 'cart/status-messages', + additionalCheckoutButtons: 'cart/additional-checkout-buttons', }, }; @@ -235,6 +237,7 @@ export default class Cart extends PageManager { this.$cartContent.html(response.content); this.$cartTotals.html(response.totals); this.$cartMessages.html(response.statusMessages); + this.$cartAdditionalCheckoutBtns.html(response.additionalCheckoutButtons); $cartPageTitle.replaceWith(response.pageTitle); this.bindEvents(); diff --git a/templates/components/cart/additional-checkout-buttons.html b/templates/components/cart/additional-checkout-buttons.html new file mode 100644 index 0000000000..e5eca62b74 --- /dev/null +++ b/templates/components/cart/additional-checkout-buttons.html @@ -0,0 +1,5 @@ +{{#if cart.additional_checkout_buttons}} + {{#each cart.additional_checkout_buttons}} + {{{this}}} + {{/each}} +{{/if}} diff --git a/templates/pages/cart.html b/templates/pages/cart.html index 12dd9cf22f..1d03614e28 100644 --- a/templates/pages/cart.html +++ b/templates/pages/cart.html @@ -43,13 +43,10 @@ {{/if}} - {{#if cart.additional_checkout_buttons}} -
- {{#each cart.additional_checkout_buttons}} - {{{this}}} - {{/each}} -
- {{/if}} +
+ {{> components/cart/additional-checkout-buttons}} +
+ {{else}}

{{lang 'cart.checkout.empty_cart'}}

{{/if}}