Skip to content

Commit

Permalink
Merge pull request #2490 from bigcommerce/CHECKOUT-8516
Browse files Browse the repository at this point in the history
feat(checkout): CHECKOUT-8516 Add Shipping Discount to Cart Page
  • Loading branch information
valentindellangela authored Oct 29, 2024
2 parents d2b55a9 + f3b4e6e commit af9e475
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Address deprecated jQuery methods [#2466](https://github.com/bigcommerce/cornerstone/pull/2466)
- Load other font weights and styles for the body-font [#2396](https://github.com/bigcommerce/cornerstone/pull/2396)
- Stored XSS within company address field [#2485](https://github.com/bigcommerce/cornerstone/pull/2485)
- Display shipping discount on the cart page [#2490](https://github.com/bigcommerce/cornerstone/pull/2490)

## 6.14.0 (05-15-2024)
- Account.php <a href> is inside of a list item [#2457](https://github.com/bigcommerce/cornerstone/pull/2457)
Expand Down
4 changes: 4 additions & 0 deletions assets/scss/components/stencil/cart/_cart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -679,3 +679,7 @@ $card-preview-zoom-bottom-offset: 6rem;
padding-bottom: spacing("single");
padding-right: spacing("single");
}

.shipping-estimate-value #shipping-cost-discounted {
margin-left: spacing("quarter");
}
7 changes: 6 additions & 1 deletion templates/components/cart/shipping-estimator.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
{{#if shipping_cost}}
<div class="cart-total-value">
<div class="subtotal shipping-estimate-show">
<a href="#" class="shipping-estimate-value">{{shipping_cost.formatted}}</a>
<a href="#" class="shipping-estimate-value">
<span class="{{#if shipping_cost_discounted}}price--discounted{{/if}}">{{shipping_cost.formatted}}</span>
{{#if shipping_cost_discounted}}
<span id="shipping-cost-discounted">{{shipping_cost_discounted.formatted}}</span>
{{/if}}
</a>
</div>
</div>
{{else}}
Expand Down

0 comments on commit af9e475

Please sign in to comment.