Partager via


UpdateInventory Constructor

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Initializes a new instance of the UpdateInventory class.

Namespace:  Microsoft.CommerceServer.Inventory
Assembly:  Microsoft.CatalogServer (in Microsoft.CatalogServer.dll)

Syntax

'Declaration
Public Sub New
'Usage

Dim instance As New UpdateInventory()
public UpdateInventory()
public:
UpdateInventory()
public function UpdateInventory()

Remarks

The component provides real time inventory stock checks on items in the customer's basket.

When UpdateInventory fails, such as when the component is unable to decrement the inventory for a line item, UpdateInventory performs the following steps: it writes a generic error, returns an error level of 2, and does not return an HRESULT. The level 2 error prevents the pipeline components after the UpdateInventory component (in the CHECKOUT pipeline) from executing. However, the Orders runtime system does not throw an exception.

Because no exception is thrown, you must write your site code to look through the _Purchase_Errors collections to determine that the pipeline failed to execute completely. Additionally, to determine the line item that caused the error, your site code must check the LineItemCollection and access the indexer property "_inventory_condition" for each line item.

Permissions

See Also

Reference

UpdateInventory Class

UpdateInventory Members

Microsoft.CommerceServer.Inventory Namespace