Hi,
We have been resolving this issue via email, I am posting this information for anyone reading this thread. You can set shipping to zero if the shipping option code name is
"alaska" and the number of items in the order is more than 10, using
custom info provider with this code:
namespace CustomProviders
{
/// <summary>
/// Customized CustomShippingOptionInfoProvider provider.
/// </summary>
public class CustomShippingOptionInfoProvider : ShippingOptionInfoProvider
{
/// <summary>
/// Calculates shipping cost for the given shopping cart. Shipping free limit is applied. Shipping taxes are not included. Result is in site main currency.
/// </summary>
/// <param name="cartObj">Shopping cart object</param>
protected override double CalculateShippingInternal(ShoppingCartInfo cartObj)
{
// Check validity
if (cartObj != null && cartObj.ShoppingCartShippingOptionID != 0 && ShippingOptionInfoProvider.GetShippingOptionInfo(cartObj.ShoppingCartShippingOptionID) != null)
{
// Check free shipping conditions
if (cartObj.TotalUnits > 10 && Convert.ToString(ShippingOptionInfoProvider.GetShippingOptionInfo(cartObj.ShoppingCartShippingOptionID)["ShippingOptionName"]).ToLower() == "alaska")
{
return 0;
}
}
return base.CalculateShippingInternal(cartObj);
}
}
}
Regards,
Josef Dvorak