Wednesday, July 11, 2012

Shipping Calculators : ATG

1.ShippingCalculatorImpl extends ShippingPricingCalculator

Methods:

a) getAvailablemethods(List pMethods, ShippingGroup pShippingGroup, RepositoryItem pPricingModel, Locale pLocale, RepositoryItem pProfile, Map pExtraParameters)

* Return type is void

* Getting the shipping methods inside it and calculate the shipping methods cost based on the method selection

b) getAmount(Order pOrder, ShippingPriceInfo pPriceQuote, ShippingGroup pShippingGroup,
 RepositoryItem pPricingModel, Locale pLocale, RepositoryItem pProfile, Map pExtraParameters
)

*. Return type is double

*. Getting the orders price, subtotals, subtotalprice,

c)haveItemsToShip(ShippingGroup pShippingGroup)

*. Return type is boolean,

*. Getting commerceItemRelationshipCount based on shippingGroup

d)performPricing(ShippingGroup pShippingGroup)

*. Return type is boolean,

*. Calculate the shipping price for each shipping methods in a shipping group


2.FixedPriceShippingCalculator extends ShippingCalculatorImpl

Methods:

a)getAmount(Order pOrder, ShippingPriceInfo pPriceQuote, ShippingGroup pShippingGroup,
 RepositoryItem pPricingModel, Locale pLocale, RepositoryItem pProfile, Map pExtraParameters
)

*. Return type is double

3.DoubleRangeShippingCalculator extends ShippingCalculatorImpl

Methods:

a)initializeRanges()

*. Its an Abstract class

*. synchronized by thread safety

*. Initializing all the price ranges like lowRanges, highRanges

4.WeightRangeShippingCalculator extends DoubleRangeShippingCalculator

Note : 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

Methods:

a) getWeightTotal(ShippingGroup pShippingGroup)

*. Return type is double,

*. This method will calculate the total weight of the orders and calculate the cost depends on its weight

b) getWeight(CommerceItem pCommerceItem)

*.Return type is double

*.This method will getting the weight of the each items in an order

c)getQuantity(ShippingGroupCommerceItemRelationship pCommerceItemRelationship)

*. Return type is double

*.This method will getting the total quantity of the each items in an order

5.PriceRangeShippingCalculator extends DoubleRangeShippingCalculator

Note: 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.

Methods:

a) getSubTotal
(Order pOrder, ShippingGroup pShippingGroup)

*.Return type is double

*.This method will getting the subTotal of each orders

b)getRangeComparisonValue(ShippingGroup pShippingGroup)

*.Return type double

* . It will return the getRangeComparisonValue(null, pShippingGroup)

6.PropertyRangeShippingCalculator extends DoubleRangeShippingCalculator

Note: 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.

Methods:

a)getRangeComparisonValue(ShippingGroup pShippingGroup)

*. Return type is double



No comments:

Popular Posts