-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow to recalculate cart prices #6399
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
Conversation
Allows a line item to recalculate its price. When prices change, that's a useful thing to have.
From version 5, we should recalculate cart prices when updating orders.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6399 +/- ##
=======================================
Coverage 89.48% 89.48%
=======================================
Files 980 980
Lines 20438 20446 +8
=======================================
+ Hits 18289 18297 +8
Misses 2149 2149 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This enhances the order updater to recalculate cart prices if preferred.
f2eda6b to
b3b5e56
Compare
tvdeyen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long overdue! Thanks
jarednorman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@forkata Can you verify if this impacts the in-memory order updater.
@jarednorman Since this is all new code, we can rebase over this change and incorporate it in our work! |
|
Love this configuration and functionality @mamhoff! One thing I've been thinking about is if it makes sense to introduce some kind of return value object from the recalculate method. I don't have a good solution for that and I don't think it should be part of this change, but I am thinking of the use case where we want to communicate a price change when advancing from cart to checkout for example, through a flash etc. |
|
In our app, we do that already. But yeah, that's certainly worth exploring. Would you mind opening an issue or a discussion so we can collect the things that we might want to communicate? |
Summary
This adds a preference that allows implementers to choose to have the order updater recalculate cart prices.
Fixes #6206
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: