flamingo-commerce
flamingo-commerce copied to clipboard
cart: Streamline OrderPlaceEvent and remove EventPublisher interface
Hello friends,
the handling of events has changed since this PR: https://github.com/i-love-flamingo/flamingo-commerce/commit/650f15f00af5799dc2779165c785bbf4341ffbc0
The events ChangedQtyInCartEvent
and AddToCartEvent
have been adjusted
to match the event handling for deferred events of the ModifyBehaviour
.
I would suggest the OrderPlacedEvent
is also added as a deferred event in the placeOrder
function of the CartService
.
This has the side effect that we can remove the dependency to the interface EventPublisher
as all events are dispatched by the EventRouter
provided to the CartService
.
I do not see the necessity for this interface, so it could be removed altogether, but feel free to correct me on this one.
Grazie!