Clean Java

There is always a bigger game

Shipping Pricing Calculators in ATG.

with 2 comments

Today I will talk about one of the Pricing Calculators of ATG called “ShippingPricingCalculator”. Basically Shipping Pricing Calculator has got three different implementations.

1. Fixed Price Calculator.
2. Range Calculator.
3. Discount Calculator.

From name itself you can figure out the use of above mentioned Shipping Calculators.

FixedPriceShippingCalculator : A shipping calculator that sets the shipping amount to a fixed price.

There are three different implementations for Range Calculator.

1. Price Range Shipping Calculator.
2. Property Range Shipping Calculator.
3. Weight Range Shipping Calculator.

All the above mentioned range calculators uses given value of ranges property to calculate the shipping price. Range can be given in “low:high:price” format.

PriceRangeShippingCalculator : A shipping calculator that determines the shipping price based on the subtotal of all the items in the shipping group. The service is configured through the ranges property. (from API document)

PropertyRangeShippingCalculator : A shipping calculator that determines the shipping price based on the summing the values of a specific property of all the items in the shipping group. The service is configured through the ranges property. (from API document)

WeightRangeShippingCalculator : This calculator will calculate shipping costs based upon the total weight of an order. So, the total weight of an order will be calculated, then the range of weight values will be consulted to determine the cost. (from API document)

There are two different implementations for Shipping Discount Calculator.

ShippingDiscountCalculator and BulkShippingDiscountCalculator. I shall talk about the discount calculators in detail in another post.

On the course of studying Shipping Calculator I have drawn the class diagram of ATG Shipping Calculators. I will share that with you guys, hopefully it will help you to grab the design quickly.

Advertisements

2 Responses

Subscribe to comments with RSS.

  1. […] Shipping Calculators in ATG. (cleanjava.wordpress.com) […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: