The cItem class controls the inventory in the Web Store application. It provides features for the online store in accessing items and showing list of items as well as providing limited stock update functionality.

Inventory items by default are assumed to be non-physical which means stock updates do not occur. If the Physical flag is set on the oData member/table field the item increases and decreases inventory through the UpdateInventoryCount() method. Inventory can be checked through the CheckStock() method.

Note: The Web store implementation of inventory updates inventory only when an order is saved to keep inline with the Web metaphor where orders are virtual until saved. Only when an invoice is written to disk is the inventory updated.

The underlying table is wws_items

Parent Class: wwbusiness

Properties, Events and Methods

Member Description
checkstockChecks to see if there's enough stock for a qty. The method takes into account the Physical flag for the item.
o.checkstock(lnQty)
getcategorylistReturns a list of items for a category or from a search.
o.getcategorylist(lcCategory, lcFields, lcAdditionalFilter, lcOrder)
getitembyskuReturns an item based on its sku.
o.getitembysku(lcSku)
getitemsRetrieves a list of all items.
o.getitems(lcFields, lcOrder, lcCursor)
updateinventorycountUpdate the Inventory Count for an item. Returns .T. or .F. if inventory is short of requested quantity. Takes into account the Physical setting of the item.
o.updateinventorycount(lnQty)


Last Updated: 06/04/03 | Send topic feedback