Dynamicweb.eCommerce.Orders Namespace > Order Class : RemoveNoneActiveProducts Method |
'Declaration
Public Sub RemoveNoneActiveProducts()
public void RemoveNoneActiveProducts()
class MyPage : System.Web.UI.Page { public void SaveToSession(Dynamicweb.eCommerce.Orders.Order EcomCart) { //Process the cart and save it to session { if (EcomCart != null) { //Save the cart //Note: Cart must be saved in a session variable BEFORE the call to RemoveNoneActiveProducts below. //Otherwise an infinite loop could be made! Dynamicweb.eCommerce.Common.Context.SetCart(EcomCart); //Remove cached prices EcomCart._CachedPrice = null; EcomCart._CachedPriceBeforeFees = null; //Check if all the products are still available EcomCart.RemoveNoneActiveProducts(); } } } }
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