Dynamicweb.eCommerce.Prices Namespace > PriceManager Class > PreparePrices Method : PreparePrices(Dictionary<Product,Double>) Method |
'Declaration
Public Overloads Shared Sub PreparePrices( _ ByVal Products As Dictionary(Of Product,Double) _ )
public static void PreparePrices( Dictionary<Product,double> Products )
class MyPage : System.Web.UI.Page { private void PreparePrices(Order order) { //Prepare prices Dictionary<Product, double> prods = new Dictionary<Product, double>(); foreach (OrderLine ol in order.OrderLines) { if (ol.Type == Base.ChkString(Base.ChkInteger(OrderLine.OrderLineType.Product)) && !prods.ContainsKey(ol.Product)) { prods.Add(ol.Product, ol.Quantity); } } Dynamicweb.eCommerce.Prices.PriceManager.PreparePrices(prods); //Find discounts Dynamicweb.eCommerce.Frontend.Cart.CartCatch.FindDiscount(); } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2