@Service(value="blMergeCartService") public class MergeCartServiceImpl extends Object implements MergeCartService
| Modifier and Type | Field and Description |
|---|---|
protected MergeCartServiceExtensionManager |
extensionManager |
protected FulfillmentGroupService |
fulfillmentGroupService |
protected OrderItemService |
orderItemService |
protected OrderService |
orderService |
| Constructor and Description |
|---|
MergeCartServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkActive(DiscreteOrderItem orderItem) |
protected boolean |
checkInventory(DiscreteOrderItem orderItem)
By default, Broadleaf does not provide an inventory check.
|
protected boolean |
checkOtherValidity(OrderItem orderItem)
By default, Broadleaf does not provide additional validity checks.
|
MergeCartResponse |
mergeCart(Customer customer,
Order anonymousCart)
Delegates to mergeCart(Customer, Order, boolean) with priceOrder set to true
Merges the anonymous cart with the customer's current cart, taking into consideration the active
status of the SKUs to merge.
|
MergeCartResponse |
mergeCart(Customer customer,
Order anonymousCart,
boolean priceOrder)
Merges the anonymous cart with the customer's current cart, taking into consideration the active
status of the SKUs to merge.
|
ReconstructCartResponse |
reconstructCart(Customer customer)
Delegates to reconstructCart(Customer, boolean) with priceOrder set to true
Reconstruct the cart using previous stored state taking into
consideration sku activation
|
ReconstructCartResponse |
reconstructCart(Customer customer,
boolean priceOrder)
Reconstruct the cart using previous stored state taking into
consideration sku activation
|
protected void |
setNewCartOwnership(Order cart,
Customer customer) |
protected void |
setSavedCartAttributes(Order cart) |
protected OrderService orderService
protected OrderItemService orderItemService
protected FulfillmentGroupService fulfillmentGroupService
protected MergeCartServiceExtensionManager extensionManager
public MergeCartResponse mergeCart(Customer customer, Order anonymousCart) throws PricingException, RemoveFromCartException
MergeCartServicemergeCart in interface MergeCartServicecustomer - the customer whose cart is to be mergedPricingExceptionRemoveFromCartExceptionpublic ReconstructCartResponse reconstructCart(Customer customer) throws PricingException, RemoveFromCartException
MergeCartServicereconstructCart in interface MergeCartServicecustomer - the customer whose cart is to be reconstructedPricingExceptionRemoveFromCartExceptionpublic MergeCartResponse mergeCart(Customer customer, Order anonymousCart, boolean priceOrder) throws PricingException, RemoveFromCartException
MergeCartServicemergeCart in interface MergeCartServicecustomer - the customer whose cart is to be mergedpriceOrder - whether or not to price the orderPricingExceptionRemoveFromCartExceptionpublic ReconstructCartResponse reconstructCart(Customer customer, boolean priceOrder) throws PricingException, RemoveFromCartException
MergeCartServicereconstructCart in interface MergeCartServicecustomer - the customer whose cart is to be reconstructedRemoveFromCartExceptionPricingExceptionprotected void setSavedCartAttributes(Order cart)
protected boolean checkActive(DiscreteOrderItem orderItem)
orderItem - protected boolean checkInventory(DiscreteOrderItem orderItem)
orderItem - protected boolean checkOtherValidity(OrderItem orderItem)
orderItem - Copyright © 2014. All Rights Reserved.