Interface MergeCartService
- All Known Implementing Classes:
MergeCartServiceImpl
public interface MergeCartService
- Author:
- Andre Azzolini (apazzolini)
-
Method Summary
Modifier and TypeMethodDescriptionDelegates to mergeCart(Customer, Order, boolean) with priceOrder set to truemergeCart(org.broadleafcommerce.profile.core.domain.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.reconstructCart(org.broadleafcommerce.profile.core.domain.Customer customer) Delegates to reconstructCart(Customer, boolean) with priceOrder set to truereconstructCart(org.broadleafcommerce.profile.core.domain.Customer customer, boolean priceOrder) Reconstruct the cart using previous stored state taking into consideration sku activation
-
Method Details
-
mergeCart
MergeCartResponse mergeCart(org.broadleafcommerce.profile.core.domain.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 mergedanonymousCart- the anonymous cart idpriceOrder- 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:
PricingExceptionRemoveFromCartException
-
mergeCart
MergeCartResponse mergeCart(org.broadleafcommerce.profile.core.domain.Customer customer, Order anonymousCart) throws PricingException, RemoveFromCartException Delegates to mergeCart(Customer, Order, boolean) with priceOrder set to trueMerges 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 mergedanonymousCart- the anonymous cart id- Returns:
- the response containing the cart, any items added to the cart, and any items removed from the cart
- Throws:
PricingExceptionRemoveFromCartException
-
reconstructCart
ReconstructCartResponse reconstructCart(org.broadleafcommerce.profile.core.domain.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:
RemoveFromCartExceptionPricingException
-
reconstructCart
ReconstructCartResponse reconstructCart(org.broadleafcommerce.profile.core.domain.Customer customer) throws PricingException, RemoveFromCartException Delegates to reconstructCart(Customer, boolean) with priceOrder set to trueReconstruct 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:
PricingExceptionRemoveFromCartException
-