Colin Bowern
If you need to display exact cost based on the items in the basket you can create a custom pipeline which calls the shipping calculation pipeline components. The pseudo code:
ShippingMethod[] shippingMethods = ShippingMethodManager.GetShippingMethods()
foreach(ShippingMethod shippingMethod in shippingMethods)
{
foreach(LineItem lineItem in basket.LineItems)
{
lineItem.ShippingMethodId = shippingMethod.Id;
}
basket.RunPipeline("shippingRateCalculation")
shippingMethodCosts.Add(shippingMethod.Id, basket.shippingTotal)
}
Another option is if you are using quantity calculation to just write a custom stored procedure which queries the shippingrates tables and returns the price for a quantity of x for each shipping rate. We use quantity calculation at the moment, so I would probably go the route of a custom stored procedure into the database for performance reasons (.NET-COM-.NET just seems like a lot of extra work).
Cheers,
Colin