Custom logic for delivery when adding to Cart

When adding an item to the cart using the Litium.Foundation.Modules.ECommerce.ShoppingCarts.Cart a “default” deliverymethod is added to the cart. How can I override this behaviour? I don’t want any deliverymethod to be added untill the user access the checkout. I Could “solve” this by doing something like this:

_cart.Add(...);
CartAccessor.Cart.OrderCarrier.Deliveries.Clear();

When adding an item to the cart outside the checkout but I would assume that there is a better way to do this.

Litium version: [7.6.1]

There’s not really any easier way to jack into this, so you could go with your approach and clearing the delivery if you’re not at checkout.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.