ATG Commerce includes several components based on atg.repository.servlet.ItemLookupDroplet. These components are configured to use the product catalog as the default repository, and to find a specific item type. These components are found in /atg/commerce/catalog: CategoryLookup, ProductLookup, SKULookup, and MediaLookup. If your site includes more than one catalog, or if your catalog uses item types not found in the standard catalog, you may want to create additional ItemLookupDroplet components.

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"
               idtype="java.lang.String">
<dsp:img src="<%=img13%>"/>
</dsp:getvalueof>
<dsp:valueof param="element.longDescription"/>
</dsp:oparam>
</dsp:droplet>

For more information about the ItemLookupDroplet servlet bean, see ItemLookupDroplet in Appendix: ATG Commerce Servlet Beans.

 
loading table of contents...