|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.broadleafcommerce.core.order.service.MergeCartServiceImpl
@Service(value="blMergeCartService") public class MergeCartServiceImpl
The 2.0 implementation of merge cart service. Instead of merging items directly from one cart to another, we will convert the previous cart to a named order that the customer is able to interact with as they see fit.
| Field Summary | |
|---|---|
protected FulfillmentGroupService |
fulfillmentGroupService
|
protected OrderItemService |
orderItemService
|
protected OrderService |
orderService
|
| Constructor Summary | |
|---|---|
MergeCartServiceImpl()
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected OrderService orderService
protected OrderItemService orderItemService
protected FulfillmentGroupService fulfillmentGroupService
| Constructor Detail |
|---|
public MergeCartServiceImpl()
| Method Detail |
|---|
public MergeCartResponse mergeCart(Customer customer,
Order anonymousCart)
throws PricingException,
RemoveFromCartException
MergeCartService
mergeCart in interface MergeCartServicecustomer - the customer whose cart is to be merged
PricingException
RemoveFromCartException
public ReconstructCartResponse reconstructCart(Customer customer)
throws PricingException,
RemoveFromCartException
MergeCartService
reconstructCart in interface MergeCartServicecustomer - the customer whose cart is to be reconstructed
PricingException
RemoveFromCartException
public MergeCartResponse mergeCart(Customer customer,
Order anonymousCart,
boolean priceOrder)
throws PricingException,
RemoveFromCartException
MergeCartService
mergeCart in interface MergeCartServicecustomer - the customer whose cart is to be mergedpriceOrder - whether or not to price the order
PricingException
RemoveFromCartException
public ReconstructCartResponse reconstructCart(Customer customer,
boolean priceOrder)
throws PricingException,
RemoveFromCartException
MergeCartService
reconstructCart in interface MergeCartServicecustomer - the customer whose cart is to be reconstructed
RemoveFromCartException
PricingException
protected void setNewCartOwnership(Order cart,
Customer customer)
protected boolean checkActive(DiscreteOrderItem orderItem)
orderItem -
protected boolean checkInventory(DiscreteOrderItem orderItem)
orderItem -
protected boolean checkOtherValidity(OrderItem orderItem)
orderItem -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||