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
'Declaration
Public Sub Add ( _
orderGroup As OrderGroup _
)
'Usage
Dim instance As Basket
Dim orderGroup As OrderGroup
instance.Add(orderGroup)
public void Add(
OrderGroup orderGroup
)
public:
void Add(
OrderGroup^ orderGroup
)
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.