The atg.commerce.pricing.WeightRangeShippingCalculator class is a shipping calculator that determines the shipping price based on the sum of the weights of each item in a shipping group.
The service is configured through the ranges property. With the given array of price range configurations (format: low:high:price), the service parses the values into their double format for calculating shipping costs. For example:
ranges=00.00:15.99:4.50,\
16.00:30.99:6.00,\
31.00:40.99:7.25,\
41.00:MAX_VALUE:10.00
Note: The keyword MAX_VALUE indicates the maximum possible value in the range.
The WeightRangeShippingCalculator also contains the following properties:
- addAmount: If the property- addAmountis- true, instead of setting the price quote amount to the value of the- amountproperty, the calculator adds the amount to the current amount in the price quote. This can be used to configure a “surcharge” calculator, which increases the shipping price.
- shippingMethod: The- shippingMethodproperty is set to the name of a particular delivery process. For example: ground, 2-day or next day.
- ignoreShippingMethod: Setting the- ignoreShippingMethodproperty to- trueprevents this calculator from exposing the shipping method name (through- getAvailableMethods). In addition, this calculator always attempts to perform pricing. This option is useful for situations in which you do not want to give customers a choice of different shipping methods.

