Skip to content

fix(core): TRAC-294 show manual checkout discounts in cart summary#3002

Open
bc-alexsaiannyi wants to merge 1 commit intocanaryfrom
trac-294
Open

fix(core): TRAC-294 show manual checkout discounts in cart summary#3002
bc-alexsaiannyi wants to merge 1 commit intocanaryfrom
trac-294

Conversation

@bc-alexsaiannyi
Copy link
Copy Markdown
Contributor

@bc-alexsaiannyi bc-alexsaiannyi commented May 4, 2026

TRAC-294

What/Why?

The cart’s “Discounts” row previously relied only on cart.discountedAmount. Because of that, line item discounts applied via the Management Checkout API directly to the cart weren’t shown in the summary, so customers had no visibility into them.

To fix this, we now account for both sources by adding each line item’s discountedAmount to the cart-level discount. This way, the Cart summary accurately reflects what Shoppers see at checkout.

Testing

Locally, using the following steps:

  1. Add item to Cart
  2. Apply a manual discount to Line Item using the Add Checkout Discount endpoint
  3. Verify that Line Item discount is visible

Before fix:

manual-item-discount_before-fix.mov

After fix:

manual-item-discount_after-fix.mov

Migration

No need

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 4, 2026

🦋 Changeset detected

Latest commit: ee0ff42

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview, Comment May 4, 2026 7:59pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Bundle Size Report

Comparing against baseline from ec92930 (2026-05-04).

No bundle size changes detected.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Unlighthouse Performance Comparison — Vercel

Comparing PR preview deployment Unlighthouse scores vs production Unlighthouse scores.

Summary Score

Aggregate score across all categories as reported by Unlighthouse.

Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Score 90 93 91 95

Category Scores

Category Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Performance 73 89 71 84
Accessibility 95 95 95 95
Best Practices 100 100 95 100
SEO 88 100 100 100

Core Web Vitals

Metric Prod Desktop Prod Mobile Preview Desktop Preview Mobile
LCP 5.0 s 3.7 s 4.5 s 4.5 s
CLS 0.037 0 0.037 0
FCP 1.2 s 1.2 s 1.2 s 1.2 s
TBT 0 ms 20 ms 0 ms 0 ms
Max Potential FID 50 ms 90 ms 50 ms 40 ms
Time to Interactive 5.0 s 3.7 s 4.5 s 4.5 s

Full Unlighthouse report →

@bc-alexsaiannyi bc-alexsaiannyi marked this pull request as ready for review May 5, 2026 11:43
@bc-alexsaiannyi bc-alexsaiannyi requested a review from a team as a code owner May 5, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants