Dynamicweb 8 Documentation
UpdateExistOrderFromCartToOrder Method
Example 

Updates the existing order from cart to order.
Syntax
'Declaration
 
Public Sub UpdateExistOrderFromCartToOrder() 
public void UpdateExistOrderFromCartToOrder()
Example
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;
       }
   }
}
Requirements

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

See Also

Reference

Order Class
Order Members

Send Feedback