Dynamicweb.eCommerce.Orders Namespace > Order Class : UpdateCartToOrder Method |
class MyPage : System.Web.UI.Page { public static void ConvertToOrder() { if (Dynamicweb.eCommerce.Common.Context.Cart != null) { bool UpdateCart = true; if (HttpContext.Current.Session["EcomLastConfirmedOrderID"] != null && Dynamicweb.eCommerce.Common.Context.Cart.ID == Base.ChkString(HttpContext.Current.Session["EcomLastConfirmedOrderID"])) { UpdateCart = false; } if (UpdateCart) { Dynamicweb.eCommerce.Common.Context.Cart.UpdateCartToOrder(); } else { Dynamicweb.eCommerce.Common.Context.Cart.IsCart = false; Dynamicweb.eCommerce.Common.Context.Cart.UpdateExistOrderFromCartToOrder(); } HttpContext.Current.Session["EcomLastConfirmedOrderID"] = Dynamicweb.eCommerce.Common.Context.Cart.ID; } } }
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