Share via


OrderForm.AddItem

Ee825651.c++_on(en-US,CS.10).gifEe825651.vb_off(en-US,CS.10).gif

Use this method to add the specified item to the items collection of an OrderForm object. The items collection is a SimpleList object containing Dictionary objects.

Definition

Function AddItem(varSKU As Variant,lCount As Long,lPlacedPrice As Long) As Object

Parameters

varSKU

A Variant that contains the SKU of the item to add.

lCount

A Long that contains the item count.

lPlacedPrice

A Long that is reserved for future use. This parameter must be set to 0 (zero).

Return Values

If this method completes successfully, it returns an object reference that holds the Dictionary object that contains the added item.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

' Order is a Commerce.OrderForm object; a quantity of 5 is 
' being added of the product whose SKU is SKUnumber.
Order.AddItem("SKUnumber", 5,0)

See Also

OrderForm Object

OrderForm.ClearItems

OrderForm.ClearOrderForm


All rights reserved.