IOrderForm::ClearItems
Use this method to clear the items collection of the OrderForm object.
Definition
HRESULT IOrderForm::ClearItems();
Parameters
None.
Return Values
This method returns an HRESULT indicating whether or not it completed successfully. See the Error Values section for more details.
Error Values
This property returns S_OK (0x00000000) to indicate success and standard COM HRESULT 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, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.
Remarks
A site uses the ClearItems method to respond to a user choosing to cancel a purchase. This method affects only the information in the items collection. Other OrderForm object information, such as _oadjust
_subtotal
and _total
_total
, is modified only if you run the Order Processing Pipeline (OPP) on this OrderForm object.
To empty the entire contents of the OrderForm object, call the ClearOrderForm method.