Interface FulfillmentWeightBand
- All Superinterfaces:
FulfillmentBand,Serializable
- All Known Implementing Classes:
FulfillmentWeightBandImpl
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:
- The weight of all of the
OrderItems (via the relationship toSku) in aFulfillmentGroup(which is obtained through their relationship withFulfillmentGroupItemare summed together - The
FulfillmentWeightBandshould be looked up by getting the closest band less than the sum of the weights - If
FulfillmentBand.getResultAmountType()returnsFulfillmentBandResultAmountType.RATE, then the cost for the fulfillment group is whatever is defined inFulfillmentBand.getResultAmount() - If
FulfillmentBand.getResultAmountType()returnsFulfillmentBandResultAmountType.PERCENTAGE, then the fulfillment cost is the percentage obtained byFulfillmentBand.getResultAmount()* retailPriceTotal - 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 Summary
Modifier and TypeMethodDescriptionvoidsetMinimumWeight(BigDecimal weight) voidvoidsetWeightUnitOfMeasure(WeightUnitOfMeasureType weightUnitOfMeasure) Methods inherited from interface org.broadleafcommerce.core.order.fulfillment.domain.FulfillmentBand
getId, getResultAmount, getResultAmountType, setId, setResultAmount, setResultAmountType
-
Method Details
-
getMinimumWeight
BigDecimal getMinimumWeight() -
setMinimumWeight
-
getOption
BandedWeightFulfillmentOption getOption() -
setOption
-
getWeightUnitOfMeasure
WeightUnitOfMeasureType getWeightUnitOfMeasure() -
setWeightUnitOfMeasure
-