remove calculate total offer from offer aggregate 2#452
Open
lukaszreszke wants to merge 2 commits intomasterfrom
Open
remove calculate total offer from offer aggregate 2#452lukaszreszke wants to merge 2 commits intomasterfrom
lukaszreszke wants to merge 2 commits intomasterfrom
Conversation
Collaborator
lukaszreszke
commented
Jun 2, 2025
- Introduce new assertion
- Publish OrderTotalValueCalculated from CalculateTotalValue
Instead of publishing this event from the aggregate now we're going to publish it from the event handler. This is temporary. Ideally we'd have an calculator for that that would subscribe to all the events that affect the offer. Additionally we'll get benefits from both of suggested solutions up until now: - we'll remove calculate_order_total_value from aggregate in next commits - read models are going to subscribe to whatever is published from CalculateTotalValue and won't have to calculate anything on their own - in next steps the events such as PriceItemAdded, PriceItemRemoved will get rid of base_total_value and total_value - change is going to be simpler as the event stands still, it is just going to be produced by different component. One that will be responsible for doing calculations. This way we'll make Offer care only about items and promotions for the offer, not the price itself.
✅ Deploy Preview for ecommerce-events ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.