if you have the SalesChannelContext available depends on the event you are subscribing to. You can not inject it via the services.xml
Which event do you use?
How do we get the current customer, cart, billing/shipping addresses/methods etc if the event does not provide a SalesChannelContext (but only a Shopware\Core\Framework\Context)? In situations when this data is defined (e.g. during the processing of a request in the checkout) there must be a way to access it. But how?
@Hansibert Did you find a solution?
I have the same problem, I am using the CheckoutOrderPlacedEvent and need to get the token of the cart the order was created from. If the CheckoutOrderPlacedEvent would contain the SalesChannelContext all would be good. But in the CartOrderRoute’s order function only the base context is passed. Why is that and is there a way to get the whole SalesChannelContext and therefore the cart token?