You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently some parts like the DefaultCarrierResolver and so on are using the ShippableInterface. Shipping rule conditions and actions are requiring the CartInterface. That means if the shippable object is no cart, the whole shipping cost calculation won't work.
So my suggestion would be to implement a function in the ShippableInterface called getSale and use the ShippableInterface throughout the whole process. If conditions or actions need some information like the store or currency of the sale, they just call getSale and get the cart or order or any other object that implements the SaleInterface
The text was updated successfully, but these errors were encountered:
dlhck
changed the title
User ShippableInterface in complete shipping cost calculation process
User ShippableInterface in throughout the whole shipping cost calculation process
Oct 10, 2018
Well, not a 100 percent right... Shipping rule conditions and actions still require a Shippable, but the default implementations of some conditions/actions require that shipable is a cart, therefore you potentially could overwrite those.
But, you are definitely right that the current solution is not ideal
dlhck
changed the title
User ShippableInterface in throughout the whole shipping cost calculation process
Use ShippableInterface in throughout the whole shipping cost calculation process
Oct 19, 2018
Currently some parts like the
DefaultCarrierResolver
and so on are using theShippableInterface
. Shipping rule conditions and actions are requiring theCartInterface
. That means if the shippable object is no cart, the whole shipping cost calculation won't work.So my suggestion would be to implement a function in the
ShippableInterface
calledgetSale
and use theShippableInterface
throughout the whole process. If conditions or actions need some information like the store or currency of the sale, they just callgetSale
and get the cart or order or any other object that implements theSaleInterface
The text was updated successfully, but these errors were encountered: