The InventoryLookup servlet bean returns inventory information based on the input parameters. The inventory information returned by this servlet bean includes:

If there is an error retrieving this information, then the error oparam will be rendered. All of this information is contained within a single inventoryInfo object, which will be rendered within the output oparam.

This servlet bean takes one required parameter and one optional parameter.

The following code sample is an example of using the InventoryLookup servlet bean:

<dsp:droplet name="/atg/commerce/inventory/InventoryLookup">
 <dsp:param param="link.item.repositoryId" name="itemId"/>
  <dsp:param value="true" name="useCache"/>
  <dsp:oparam name="output">
      This item is
      <dsp:valueof param="inventoryInfo.availabilityStatusMsg"/><br>
      There are
      <dsp:valueof param="inventoryInfo.stockLevel"/>
      left in the inventory.<br>

Note: The Inventory Framework can also be configured to use the LocalizingInventoryDroplet, which is similar to InventoryLookup, but can also include a localeKey parameter.

loading table of contents...