Site structure
Version 5.x > Site structure > Shipping by Weight View modes: 
User avatar
Member
Member
eyesea69-gmail - 6/12/2010 2:43:44 PM
   
Shipping by Weight
I have been trying to configure a shopping cart to charge for shipping by weight. I thought this would be fairly simple considering that weight and dimensions are allready available in the product, but I am running in to problems figuring this out.
Basically the ideas I have tried involve bringing the Item Weight into the shopping cart from the table COM_SKU and then doing a mulitiplier with the Item Count and Item Weight for each item and add them up for the Shipping Total.
I tried doing this by just creating a new shopping cart steps, but I can't make the data available so I assume now that I will have to try a custom provider to bring the right data in. My problem is I cannot really determine which is the best provider to customize for this. I am thinking either the OrderInfoProvider or ther OrderItemInfoProvider.
Has anyone else out there had any luck with this particular modification?

User avatar
Kentico Support
Kentico Support
kentico_radekm - 6/21/2010 1:28:28 AM
   
RE:Shipping by Weight
Hello.

You will need to use CustomShippingOptionInfoProvider.CalculateShipping method (described in our documentation) to calculate different shipping for different weight.

Could you please follow these steps?

1. Turn on the custom e-commerce providers as described here: www.kentico.com/docs/devguide/using_custom_providers.htm
2. Edit class "CustomShippingOptionInfoProvider.cs" and find the method "CalculateShipping(object cartObj, string siteName)"
3. In this method you can add the Tax you need (www.kentico.com/docs/devguide/customshippingoptioninfoprovid.htm).

I hope this will cover your needs.

Best Regards,
Radek Macalik