We currently have a shipping estimate on the product pages based on the weight of the product to mainland UK.
We want to add in to the shopping cart a basic estimator for shipping to the UK. I am guessing we need to loop the products in the basket and add the total weight up. Then compare this again the database to show a basic estimate of the shipping.
So far I have the SQL statement but no idea where I should loop the products and how to include the weight in the sql statement.
Code:
SELECT ShippingCharge
FROM dbo.ShippingByWeight ON ISNULL(@weight, 0.0) >= dbo.ShippingByWeight.LowValue AND ISNULL(@weight, 0.0) < dbo.ShippingByWeight.HighValue
WHERE (dbo.ShippingByWeight.ShippingMethodID = 2)
We have the source code and have access to the c#.
Any advice would be helpful.
(We know there is a shipping estimator already however we need to use our own.)