Commerce Reference Store looks up inventory information for a product when the product detail page is loaded, and sends the information over to the browser, where it is available for use by browser-side JavaScript. This information is accessed at various points: when a customer selects an individual SKU or hovers the mouse over a color or size in the picker; when displaying a shopping cart; during the checkout process. For example, if a customer views the product detail page for the Long Sleeve Soft Touch Hoodie, and selects size Small, color Red, the SKU picker looks like this:

This illustration is described in the surrounding text.

When a SKU is selected that is not in stock, the label on the Add to Cart button changes to reflect this. In the example above, the label has changed to Preorder Item because the selected SKU is preorderable.

Inventory lookup is done by the store.war/global/gadgets/skuAvailabilityLookup.jsp gadget. This gadget invokes the /atg/store/droplet/SkuAvailabilityLookup servlet bean component, which is of class atg.project.store.droplet.SkuAvailabilityLookup. This component is configured to use the Commerce Reference Store Inventory Manager to obtain inventory information from the inventory repository. If a SKU is not in stock, SkuAvailabilityLookup displays a message about its availability status (such as Available for Preorder, as shown in the figure above), and changes the label of the Add to Cart button (in this case, to Preorder Item).

See Appendix A, Sample Data for more information about preorderable products.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices