org.broadleafcommerce.core.order.service
Interface MergeCartService

All Known Implementing Classes:
LegacyMergeCartServiceImpl, MergeCartServiceImpl

public interface MergeCartService

Author:
Andre Azzolini (apazzolini)

Method Summary
 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
 

Method Detail

mergeCart

MergeCartResponse mergeCart(Customer customer,
                            Order anonymousCart,
                            boolean priceOrder)
                            throws PricingException,
                                   RemoveFromCartException
Merges the anonymous cart with the customer's current cart, taking into consideration the active status of the SKUs to merge. For example, if the customer had a SKU in their anonymous cart that is no longer active, it will not be merged into the new cart.

Parameters:
customer - the customer whose cart is to be merged
anonymousCartId - the anonymous cart id
priceOrder - whether or not to price the order
Returns:
the response containing the cart, any items added to the cart, and any items removed from the cart
Throws:
PricingException
RemoveFromCartException

mergeCart

MergeCartResponse mergeCart(Customer customer,
                            Order anonymousCart)
                            throws PricingException,
                                   RemoveFromCartException
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. For example, if the customer had a SKU in their anonymous cart that is no longer active, it will not be merged into the new cart.

Parameters:
customer - the customer whose cart is to be merged
anonymousCartId - the anonymous cart id
Returns:
the response containing the cart, any items added to the cart, and any items removed from the cart
Throws:
PricingException
RemoveFromCartException

reconstructCart

ReconstructCartResponse reconstructCart(Customer customer,
                                        boolean priceOrder)
                                        throws PricingException,
                                               RemoveFromCartException
Reconstruct the cart using previous stored state taking into consideration sku activation

Parameters:
customer - the customer whose cart is to be reconstructed
Returns:
the response containing the cart and any items removed from the cart
Throws:
RemoveFromCartException
PricingException

reconstructCart

ReconstructCartResponse reconstructCart(Customer customer)
                                        throws PricingException,
                                               RemoveFromCartException
Delegates to reconstructCart(Customer, boolean) with priceOrder set to true Reconstruct the cart using previous stored state taking into consideration sku activation

Parameters:
customer - the customer whose cart is to be reconstructed
Returns:
the response containing the cart and any items removed from the cart
Throws:
PricingException
RemoveFromCartException


Copyright © 2013. All Rights Reserved.