Basket Service
A service which handles all things around the basket
The basket service is what and handles all the UmbCheckout Basket operations.
You can access the basket service by injecting IBasketService which can be found within the namespaceUmbCheckout.Core.Interfaces
Gets the Basket
Adds an item to the Basket
Parameters:
Item to be added to the Basket
Task<Basket> Add(LineItem item);
Adds multiple items to the Basket
Parameters:
Items to be added to the Basket
Task<Basket> Add(IEnumerable<LineItem> items);
Reduces the specified item by a count of 1 or removes from the Basket if only 1
Parameters:
Item to be reduced in the Basket
Removes the specified item from the Basket
Parameters:
Item to be removed from the Basket
Remove Multiple
Removes multiple items from the Basket
Parameters:
Items to be removed from the Basket
Removes all items from the Basket and clears any set Basket cookies
Returns the total item quantity count
Returns the Basket subtotal (minus any shipping or tax)