Interface FulfillmentWeightBand

All Superinterfaces:
FulfillmentBand, Serializable
All Known Implementing Classes:
FulfillmentWeightBandImpl

public interface FulfillmentWeightBand extends FulfillmentBand

This entity defines the bands that can be specified for BandedWeightFulfillmentOption. Bands work on the cumulated weight of an Order and should be calculated as follows:

  1. The weight of all of the OrderItems (via the relationship to Sku) in a FulfillmentGroup (which is obtained through their relationship with FulfillmentGroupItem are summed together
  2. The FulfillmentWeightBand should be looked up by getting the closest band less than the sum of the weights
  3. If FulfillmentBand.getResultAmountType() returns FulfillmentBandResultAmountType.RATE, then the cost for the fulfillment group is whatever is defined in FulfillmentBand.getResultAmount()
  4. If FulfillmentBand.getResultAmountType() returns FulfillmentBandResultAmountType.PERCENTAGE, then the fulfillment cost is the percentage obtained by FulfillmentBand.getResultAmount() * retailPriceTotal
  5. If two bands have the same weight, the cheapest resulting amount is used

Note: this implementation assumes that units of measurement (lb, kg, etc) are the same across the site implementation

Author:
Phillip Verheyden
  • Method Details

    • getMinimumWeight

      BigDecimal getMinimumWeight()
    • setMinimumWeight

      void setMinimumWeight(BigDecimal weight)
    • getOption

    • setOption

      void setOption(BandedWeightFulfillmentOption option)
    • getWeightUnitOfMeasure

      org.broadleafcommerce.common.util.WeightUnitOfMeasureType getWeightUnitOfMeasure()
    • setWeightUnitOfMeasure

      void setWeightUnitOfMeasure(org.broadleafcommerce.common.util.WeightUnitOfMeasureType weightUnitOfMeasure)