Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
- Expose shopper messaging on Cart page to show that maximum discount limit has been reached [#2620](https://github.com/bigcommerce/cornerstone/pull/2620)
- Fix `onThemeBundleMain` binding to `window` load instead of script element, guard `optionChangeDecorator` against null response on error, and fix `updateWalletButtonsView` crash on cart edit modal [#2615](https://github.com/bigcommerce/cornerstone/pull/2615)
- Add to Cart and quantity buttons disabled when BCData is empty [#2612](https://github.com/bigcommerce/cornerstone/pull/2612)
- Introduce strikethrough display for discounted shipping quote prices on cart page [#2611](https://github.com/bigcommerce/cornerstone/pull/2611)
Expand Down
7 changes: 7 additions & 0 deletions assets/scss/components/stencil/cart/_cart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,13 @@ $card-preview-zoom-bottom-offset: 6rem;
.cart-coupon-name {
flex: 1;
margin-left: spacing("sixth");
display: inline-flex;
flex-direction: column;

.cart-coupon-limit {
color: stencilColor("color-success");
font-size: fontSize("tiny");
}
}

.coupon-code-cancel,
Expand Down
3 changes: 2 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
"button": "Apply",
"coupon_code": "Enter your coupon code",
"code_label": "Coupon ({code})",
"remove": "Remove"
"remove": "Remove",
"maximum_discount_applied": "Maximum discount applied"
},
"gift_certificates": {
"apply_gift_certificate": "Apply gift certificate",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 16 additions & 6 deletions templates/components/cart/totals.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@
<li class="cart-discount-item">
<div class="cart-discount-item-label">
<i class="icon" aria-hidden="true"><svg><use href="#icon-promotions" /></svg></i>
<span class="cart-coupon-name">{{lang 'cart.automatic_discount'}}</span>
<span class="cart-coupon-name">
{{lang 'cart.automatic_discount'}}
{{#if cart.order_based_auto_discount_max_limit_reached}}
<span class="cart-coupon-limit">{{lang 'cart.coupons.maximum_discount_applied'}}</span>
{{/if}}
</span>
</div>
<div class="cart-discount-item-value">
{{cart.order_based_auto_discount_total.formatted}}
Expand All @@ -48,11 +53,16 @@
<li class="cart-discount-item">
<div class="cart-discount-item-label">
<i class="icon" aria-hidden="true"><svg><use href="#icon-promotions" /></svg></i>
{{#if display_name}}
<span class="cart-coupon-name">{{display_name}} ({{code}})</span>
{{else}}
<span class="cart-coupon-name">{{code}}</span>
{{/if}}
<span class="cart-coupon-name">
{{#if display_name}}
{{display_name}} ({{code}})
{{else}}
{{code}}
{{/if}}
{{#if has_max_limit_reached}}
<span class="cart-coupon-limit">{{lang 'cart.coupons.maximum_discount_applied'}}</span>
{{/if}}
</span>
</div>
<div class="cart-discount-item-value">
{{#if discount.value '===' 0}}-{{/if}}{{discount.formatted}}
Expand Down