You are here: Ektron Namespace > Providers API > Ektron.Cms.Commerce.Inventory Namespace > Ektron.Cms.Commerce.Inventory.Provider Namespace > InventoryProvider Class > InventoryProvider Methods > DecreaseStockLevel
Ektron CMS400.NET API Documentation
ContentsIndexHome
PreviousUpNext
InventoryProvider.DecreaseStockLevel Method

Decreases the stock level for a catalog entry (product) based on its ID and the given quantity. For example, if a site visitor purchases two copies of the same book (ID=12) from your site, you might use the following line of code to decrease the book's in-stock quantity by two:

inventory.DecreaseStockLevel(12, 2);
C#
public virtual void DecreaseStockLevel(long entryId, int quantity);
Visual Basic
Public virtual Function DecreaseStockLevel(entryId As long, quantity As Integer) As void
Parameters 
Description 
entryId 
Enter the numeric ID of the catalog entry (product). 
quantity 
Enter the numeric quantity by which the stock level will decrease. 

The default implementation uses GetInventory() and SaveInventory().

Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at [email protected].
Copyright (c) 2008. All rights reserved.
What do you think about this topic? Send feedback!