On the Category Page and product detail pages, Commerce Reference Store JSP code also inserts a container <div> element that specifies information about the recommendations to be displayed.

On the Category Page, which is Endeca-driven, the container <div> is inserted by store.war/cartridges/ProductSpotlight-ATGCategoryRecommendations.jsp, which is the renderer for the ProductSpotlight-ATGCategoryRecommendations cartridge. See the Cartridge Handlers Implemented in Commerce Reference Store chapter for information about how the <div> is inserted.

On product detail pages, the content of the container <div> element is generated by the store.war/browse/gadgets/productRecommendationsContainer.jsp gadget. This gadget checks for the existence of the StoreRecommendationsConfiguration component, and if this component is present, uses the /atg/store/recommendations/droplet/RecommendationCategoriesForProduct servlet bean to generate a list of the categories that Oracle Recommendations should draw recommended products from.

The productRecommendationsContainer.jsp gadget also includes the following code to filter the product’s related products to create the list of merchandiser-defined cross-sells to include in the recommendations:

<dsp:droplet name="ItemSiteGroupFilterDroplet">
  <dsp:param name="collection" param="product.relatedProducts"/>

  <dsp:oparam name="output">
    <dsp:getvalueof var="filteredRelatedItems" param="filteredCollection"/>
    <dt>includeRandom</dt>
    <dd>
      <dl>
        <c:forEach var="relatedProduct" items="${filteredRelatedItems}">
          <dt>${relatedProduct.repositoryId}</dt>
        </c:forEach>
      </dl>
    </dd>
  </dsp:oparam>
</dsp:droplet>

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