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

Saves inventory information for a catalog entry. Some of the items saved include:

  • EntryId
  • UnitsInStock
  • UnitsOnOrder
  • ReorderLevel
For example, if you have an item with the ID of 12 and you want to set its units in stock to 3, the units on order to 10, and the re-order level 5, you might use the following lines of code:

item.EntryId = 12;
item.UnitsInStock = 3;
item.UnitsOnOrder = 10;
item.ReorderLevel = 5;
inventory.SaveInventory(item);

When creating a custom inventory provider, you must implement this method.

C#
public abstract void SaveInventory(InventoryData inventory);
Visual Basic
Public abstract Function SaveInventory(inventory As InventoryData) As void
Parameters 
Description 
inventoryData 
The inventory object to save. 

Implementations of this method should raise the OnBeforeStockLevelSet, OnAfterStockLevelSet, and OnReOrderLevelReached events as appropriate. Other eCommerce functionality depends on these events occuring.

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!