public interface BasketController extends WidgetController
| Modifier and Type | Interface and Description |
|---|---|
static interface |
BasketController.CartSummary
Interface type returned by
getCartSummary(). |
| Modifier and Type | Method and Description |
|---|---|
boolean |
activateAnonymousCartByCode(java.lang.String cartCode)
Find and load a cart owned by the anonymous customer for the given cart code.
|
void |
addToCart(TypedObject product,
long qty)
Add product to the cart
|
void |
cleanupAnonymousCart()
Clear the agent's anonymous cart
|
void |
clearCart()
Clear the current cart
|
java.util.List<TypedObject> |
getAppliedOrderPromotions()
Get the applied order level promotion results
|
java.util.List<TypedObject> |
getAvailableDeliveryAddresses()
Get the available delivery addresses for the current cart
|
java.util.List<TypedObject> |
getAvailableDeliveryModes()
Get the available delivery modes for the current cart
|
TypedObject |
getCart()
Get the current cart
|
TypedObject |
getCartCurrency()
Get the current cart's currency
|
BasketController.CartSummary |
getCartSummary()
Get summary and totals information for the current cart
|
WidgetBrowserModel |
getCheckoutBrowser()
Get the checkout browser
|
CheckoutController |
getCheckoutController()
Get the checkout controller
|
TypedObject |
getDefaultDeliveryMode()
Get the default delivery mode.
|
java.util.List<TypedObject> |
getEntries()
Get the cart entries
|
java.util.List<TypedObject> |
getPotentialOrderPromotions()
Get potential order level promotion results
|
java.util.List<CartLineItem> |
getPromotionalCartLineItems()
Get the cart lines as cart line item wrappers.
|
boolean |
setCartCurrency(TypedObject currency)
Change the cart's currency.
|
boolean |
setCartDeliveryMode(TypedObject cart,
TypedObject deliveryMode)
Set the delivery mode for the whole cart.
|
boolean |
setCartEntryDeliveryAddress(TypedObject cartEntry,
TypedObject deliveryAddress)
Set the delivery address for a cart entry
|
boolean |
setCartEntryDeliveryMode(TypedObject cartEntry,
TypedObject deliveryMode)
Set the delivery mode for a cart entry
|
void |
setDeliveryAddress(TypedObject address)
Set the delivery address for the cart
|
void |
setPaymentAddress(TypedObject address)
Set the payment address for the cart
|
void |
setQuantity(TypedObject cartEntry,
long qty)
Change the quantity for a cart entry
|
boolean |
transferAnonymousCartToCustomer(java.lang.String cartCode,
TypedObject customer)
Transfer the current anonymous cart to the specified customer.
|
void |
triggerCheckout()
Begins the checkout flow for the current cart.
|
addCockpitEventAcceptor, dispatchEvent, removeCockpitEventAcceptor, setCockpitEventAcceptorsvoid addToCart(TypedObject product, long qty)
product - the product to addqty - the quantity of the product to addvoid setQuantity(TypedObject cartEntry, long qty)
cartEntry - the cart entryqty - the new quantity for the cart entryjava.util.List<TypedObject> getEntries()
java.util.List<CartLineItem> getPromotionalCartLineItems()
java.util.List<TypedObject> getPotentialOrderPromotions()
java.util.List<TypedObject> getAppliedOrderPromotions()
TypedObject getCart()
BasketController.CartSummary getCartSummary()
TypedObject getCartCurrency()
boolean setCartCurrency(TypedObject currency)
currency - the new currencyvoid cleanupAnonymousCart()
boolean transferAnonymousCartToCustomer(java.lang.String cartCode,
TypedObject customer)
cartCode - the code of the anonymous cart to transfercustomer - the customer that the cart is transferred tovoid triggerCheckout()
throws ValidationException
ValidationException - thrown on validation errorvoid setDeliveryAddress(TypedObject address)
address - the delivery addressvoid setPaymentAddress(TypedObject address)
address - the payment addressboolean setCartEntryDeliveryMode(TypedObject cartEntry, TypedObject deliveryMode)
cartEntry - the cart entrydeliveryMode - the delivery mode to set, set to null to clearboolean setCartEntryDeliveryAddress(TypedObject cartEntry, TypedObject deliveryAddress)
cartEntry - the cart entrydeliveryAddress - the delivery address to set, set to null to clear.boolean setCartDeliveryMode(TypedObject cart, TypedObject deliveryMode)
cart - the cartdeliveryMode - the delivery mode for the cartTypedObject getDefaultDeliveryMode()
java.util.List<TypedObject> getAvailableDeliveryModes()
java.util.List<TypedObject> getAvailableDeliveryAddresses()
void clearCart()
boolean activateAnonymousCartByCode(java.lang.String cartCode)
cartCode - the cart code used to lookup the cartWidgetBrowserModel getCheckoutBrowser()
CheckoutController getCheckoutController()
Copyright © 2018 SAP SE. All Rights Reserved.