Collapse AllExpand All        Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: J# Code: JScript 
Add Method (OrderGroup)

Adds the collection of order forms for the specified order group to the current instance.

Namespace:  Microsoft.CommerceServer.Runtime.Orders
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax

Visual Basic (Declaration)
Public Sub Add ( _
    orderGroup As OrderGroup _
)
Visual Basic (Usage)
Dim instance As Basket
Dim orderGroup As OrderGroup

instance.Add(orderGroup)
C#
public void Add(
    OrderGroup orderGroup
)
Visual C++
public:
void Add(
    OrderGroup^ orderGroup
)
JScript
public function Add(
    orderGroup : OrderGroup
)

Parameters

orderGroup
Type: Microsoft.CommerceServer.Runtime.Orders..::.OrderGroup
An OrderGroup containing the OrderFormCollection to be added to the basket.
Remarks

Use this method to add items from the specified orderGroup to this basket instance.

If an OrderForm with the same name does not already exist within the OrderGroup, then a new OrderForm is created and populated with the line items from OrderGroup. If an OrderForm with the same name exists in the current instance, the line items from OrderGroup will be added to the current instance.

Even if a line item being added already exists on the order form, a new line item is always created in the target basket, and the quantity, product catalog, product ID, and product variant ID are copied from the original line item to the new. No other data, such as shipping address information, is copied from the line item being added.

Permissions

See Also

Reference

Page view tracker