Interface CartTotalsCalculator
-
- All Known Implementing Classes:
DefaultCartTotalsCalculator
public interface CartTotalsCalculatorService that assistsCartPricingServicein calculating price totals for the various members of aCart.- Author:
- Nathan Moore (nathandmoore)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.money.MonetaryAmountcalculateCartSubtotal(com.broadleafcommerce.cart.client.domain.Cart cart)CalculatesCartPricing.getSubtotal().javax.money.MonetaryAmountcalculateCartTotalAfterTax(com.broadleafcommerce.cart.client.domain.CartPricing cartPricing)Calculates theCartPricing.getTotal()including tax.javax.money.MonetaryAmountcalculateCartTotalBeforeTax(com.broadleafcommerce.cart.client.domain.CartPricing cartPricing)Calculates theCartPricing.getTotal()without tax.javax.money.MonetaryAmountcalculateFulfillmentTotal(com.broadleafcommerce.cart.client.domain.Cart cart)CalculatesCartPricing.getFulfillmentTotal().
-
-
-
Method Detail
-
calculateCartSubtotal
javax.money.MonetaryAmount calculateCartSubtotal(com.broadleafcommerce.cart.client.domain.Cart cart)
CalculatesCartPricing.getSubtotal(). This will also calculate and setCartItem.getAdjustmentsTotal()andCartItem.getTotal().- Parameters:
cart- Cart for which to calculate a subtotal- Returns:
- Subtotal for the cart.
-
calculateFulfillmentTotal
javax.money.MonetaryAmount calculateFulfillmentTotal(com.broadleafcommerce.cart.client.domain.Cart cart)
CalculatesCartPricing.getFulfillmentTotal(). This will also calculate and set the totals forFulfillmentGroupsandFulfillmentItems.- Parameters:
cart- Cart for which to calculate a subtotal- Returns:
- Fulfillment total for the cart
-
calculateCartTotalBeforeTax
javax.money.MonetaryAmount calculateCartTotalBeforeTax(com.broadleafcommerce.cart.client.domain.CartPricing cartPricing)
Calculates theCartPricing.getTotal()without tax. This will include the subtotal, adjustments total, and fulfillment total.- Parameters:
cartPricing- The pricing fields of a Cart to total.- Returns:
- The cart total before tax
-
calculateCartTotalAfterTax
javax.money.MonetaryAmount calculateCartTotalAfterTax(com.broadleafcommerce.cart.client.domain.CartPricing cartPricing)
Calculates theCartPricing.getTotal()including tax. This will include the subtotal, adjustments total, total tax, and fulfillment total.- Parameters:
cartPricing- The pricing fields of a Cart to total.- Returns:
- The cart total including tax
-
-