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: Applying multiple discounts results in incorrect discountTotal #2107

Open
wants to merge 2 commits into
base: 1.x
Choose a base branch
from

Conversation

tvlokven
Copy link
Contributor

Fix: When multiple Discounts apply to the same CartLine, the subTotalDiscount and discountBreakdown contain both discounts, but the discountTotal of the Cart and CartLine only contained the value of the last Discount.

This inconsistency resulted in values not correctly adding up in the Admin Panel Order Detail and other places.

This commit fixed both the discountTotal of the Cart and the CartLine to match the Cart's discountBreakdown, subTotalDiscounted & total.

Copy link

vercel bot commented Feb 14, 2025

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

Name Status Preview Comments Updated (UTC)
lunar-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2025 3:22pm

tim and others added 2 commits February 14, 2025 16:22
…Discount and discountBreakdown contain both discounts, but the discountTotal of the Cart and CartLine only contained the value of the last Discount.

This inconsistency resulted in values not correctly adding up in the Admin Panel Order Detail and other places.

This commit fixed both the discountTotal of the Cart and the CartLine to match the discountBreakdown, subTotalDiscounted & total
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.

None yet

2 participants