Yes there is, I do a similar thing as shipping for a site I built is based upon the delivery country
In your custom calculator you will have an overridden method called CalculateShippingMethodPrice. One of the parameters of this is ShippingCalculatorContext context
This context has access to the order via the Order property;
context.Order
This should allow you to access your order to identify the number of items on it.
Access order details in shipping calculator
Is there any way to access order details from within a custom shipping calculator?
Our client charges shipping at $x flat rate + $y per item for overseas postage, so we need to be able to determine how many items are in the order.
Hi Lesley,
Yes there is, I do a similar thing as shipping for a site I built is based upon the delivery country
In your custom calculator you will have an overridden method called CalculateShippingMethodPrice. One of the parameters of this is
ShippingCalculatorContext context
This context has access to the order via the Order property;
This should allow you to access your order to identify the number of items on it.
Cheers
Nik
Thanks Nik,
Worked perfectly..
is working on a reply...