Use the atg.commerce.catalog.custom.CatalogItemLookupDroplet class to locate and display items in a repository. This servlet bean takes input parameters specifying the repository, repository ID, site ID, site scope, catalog, and item type, and renders the specified item on the page.

Rather than specifying the repository and item type through input parameters, you can set these through the servlet bean’s properties file. Oracle ATG Web Commerce includes several lookup components that are configured to use the product catalog as the default repository and find a specific item type. The following three components are all based on the CatalogItemLookupDroplet and are found in /atg/commerce/catalog/:

If your sites include more than one catalog, or if your catalog uses item types not found in the catalog, you may want to create additional CatalogItemLookupDroplet components. For more information about the CatalogItemLookupDroplet servlet bean, see CatalogItemLookupDroplet in Appendix A, Oracle ATG Web Commerce Servlet Beans.

The following additional lookup components in /atg/commerce/catalog/ are based on the ItemLookupDroplet, which does not include catalog or site filtering capabilities.

See the ATG Page Developer's Guide for information on the ItemLookupDroplet. This droplet is also used by the gift list feature; see Setting Up Gift Lists and Wish Lists in the ATG Commerce Programming Guide.

The following example shows a portion of a JSP that uses the ProductLookup component to display the current product. The product’s repository ID is passed to this page (via the itemId parameter) from the page that links to it:

<dsp:droplet name="/atg/commerce/catalog/ProductLookup">
<dsp:param param="itemId" name="id"/>

<dsp:oparam name="output">
<p><b><dsp:valueof param="element.displayName"/></b>
<p><dsp:getvalueof id="img13" param="element.largeImage.url"
<dsp:img src="<%=img13%>"/>
<dsp:valueof param="element.longDescription"/>