Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): use amount and discounts fields for cart summary #659

Merged
merged 5 commits into from
Mar 15, 2024

Conversation

jorgemoya
Copy link
Contributor

@jorgemoya jorgemoya commented Mar 14, 2024

What/Why?

Discount was not showing in cart for a marketing promotion. Noticed we were using the discountedAmount for each specific line item instead of the global discounted amount value.

Screenshot 2024-03-14 at 2 59 56 PM

Screenshot 2024-03-14 at 6 55 10 PM

Testing

Locally

@jorgemoya jorgemoya requested a review from a team as a code owner March 14, 2024 20:01
Copy link

changeset-bot bot commented Mar 14, 2024

🦋 Changeset detected

Latest commit: 8bef691

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

Copy link

vercel bot commented Mar 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 15, 2024 4:50pm
catalyst-storybook 🔄 Building (Inspect) Visit Preview 💬 Add feedback Mar 15, 2024 4:50pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
catalyst-1millionproducts-store ⬜️ Ignored (Inspect) Visit Preview Mar 15, 2024 4:50pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Mar 15, 2024 4:50pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Mar 15, 2024 4:50pm

@christensenep
Copy link
Contributor

It looks like the Grand Total in your screenshot isn't taking into account the discounts, is that correct?

@jorgemoya jorgemoya changed the title fix(core): use full discount amount for all line items fix(core): use amount and discounts fields for cart summary Mar 15, 2024
Copy link
Contributor

⚡️🏠 Lighthouse report

We ran Lighthouse against the changes and produced this report. Here's the summary:

Category Score
🟢 Performance 99
🟢 Accessibility 100
🟠 Best practices 78
🟢 SEO 92

Lighthouse ran against https://catalyst-latest-6zkpx78l1-bigcommerce-platform.vercel.app/

@jorgemoya
Copy link
Contributor Author

It looks like the Grand Total in your screenshot isn't taking into account the discounts, is that correct?

Fixed by using amount value from Cart.

@jorgemoya jorgemoya added this pull request to the merge queue Mar 15, 2024
Merged via the queue into main with commit 35e5c96 Mar 15, 2024
12 checks passed
@jorgemoya jorgemoya deleted the fix-discounts-cart branch March 15, 2024 18:09
This was referenced Mar 15, 2024
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.

3 participants