Skip to content

Commit 907b8e5

Browse files
Merge pull request #2568 from bigcommerce/ORDERS-6497
feat(orders): ORDERS-6497 add support for shipping discounts on orders/details and orders/invoice
2 parents 68de7e5 + 2504221 commit 907b8e5

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## Draft
88
- Add net-new "order.pickup_addresses" to unify objects used on Order Details and Order Invoice pages [#2557](https://github.com/bigcommerce/cornerstone/pull/2557)
99
- Removed banner widget configuration and related translations [#2561](https://github.com/bigcommerce/cornerstone/pull/2561)
10+
- Add support for shipping discounts in "order.total_rows" for use on the Order Details and Order Invoice pages [#2568](https://github.com/bigcommerce/cornerstone/pull/2568)
1011

1112
## 6.16.2 (06-18-2025)
1213
- Restore indentation and quote rules to match BC Sass Style Guide [#2554](https://github.com/bigcommerce/cornerstone/pull/2554)

assets/scss/components/stencil/account/_account.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,19 @@
286286
}
287287
}
288288

289+
.account-orderTotal-discount {
290+
margin: 0;
291+
text-align: right;
292+
font-weight: fontWeight("normal");
293+
padding: spacing("half") 0;
294+
border-bottom: 0;
295+
296+
&:last-of-type {
297+
border-bottom: container("border");
298+
padding-top: 0;
299+
}
300+
}
301+
289302

290303
// Account status
291304
// -----------------------------------------------------------------------------

templates/pages/account/orders/details.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ <h2 class="page-heading title">{{lang 'account.orders.details.heading' number=or
1818
{{#if value.value}}
1919
<dt class="account-orderTotal-key">{{label}}:</dt>
2020
<dd class="account-orderTotal-value">{{value.formatted}}</dd>
21+
{{#if shipping_discounts}}
22+
<dl>
23+
{{#each shipping_discounts}}
24+
<dt class="account-orderTotal-discount">{{label}}</dt>
25+
{{/each}}
26+
</dl>
27+
{{/if}}
2128
{{/if}}
2229
{{/each}}
2330
</dl>

templates/pages/account/orders/invoice.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,13 @@ <h2 class="InvoiceHeading">{{lang 'invoice.order_items'}}</h2>
194194
<td class="Title" colspan="{{#if ../order.has_multiple_shipping_addresses}}5{{else}}4{{/if}}">{{label}}</td>
195195
<td class="Total">{{value.formatted}}</td>
196196
</tr>
197+
{{#if shipping_discounts}}
198+
{{#each shipping_discounts}}
199+
<tr class="InvoiceTotalRow">
200+
<td class="Title" colspan="5">{{label}}</td>
201+
</tr>
202+
{{/each}}
203+
{{/if}}
197204
{{/each}}
198205
</tfoot>
199206
</table>

0 commit comments

Comments
 (0)