Dynamicweb 8 Documentation
UpdateQuantity Method
Example 

The order line.
Updates the quantity.
Syntax
'Declaration
 
Public Sub UpdateQuantity( _ 
   ByVal _OrderLine As OrderLine _ 
) 
public void UpdateQuantity( 
   OrderLine _OrderLine 
)

Parameters

_OrderLine
The order line.
Example
internal static void  UpdateOrderLine (int quantity, string orderLineID)
{
   	OrderLine line = new OrderLine(orderLineID);
   	Order EcomCart = Common.Context.Cart();
   	EcomCart.IsCart = true;

   	line.Modified = DateTime.Now;
   	line.Order = EcomCart;

   	if (quantity > 0)
   	{
   		line.Quantity = quantity;
   		EcomCart.OrderLines.UpdateQuantity(line);
   	}

   	line.ID = ""; 
   	SaveCart();
}
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

OrderLineCollection Class
OrderLineCollection Members

Send Feedback