Dynamicweb 8 Documentation
DowngradeToCart Method
Example 

Converts the order back to cart
Syntax
'Declaration
 
Public Sub DowngradeToCart() 
public void DowngradeToCart()
Example
class MyPage : System.Web.UI.Page
{
   public void DoSave(Dynamicweb.eCommerce.Orders.Order order)
   {
       //Broadcast CheckoutDoneOrderIsNotComplete notification
       NotificationManager.Notify(Dynamicweb.eCommerce.Cart.Notifications.CheckoutDoneOrderIsNotComplete, new Dynamicweb.eCommerce.Cart.Notifications.CheckoutDoneOrderIsNotCompleteArgs { Order = order });

       //Convert back to cart and add to context
       order.DowngradeToCart();
       Dynamicweb.eCommerce.Common.Context.SetCart(order);
       order.CartV2StepIndex = 0;
       order.Save(order.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