On product detail pages and top-level category pages, Commerce Reference Store JSP code also inserts a container <div> element that specifies information about the recommendations to be displayed. For example, on a top-level category page:

<div id="cs-recslot-category" class="cs-slot">
  <dl class="cs-cfg" style="display: none">
    <dt>headerText</dt><dd>Top Sellers</dd>
    <dt>numRecs</dt><dd>4</dd>
    <dt>renderer</dt><dd>crs</dd>
    <dt>-rec-builder</dt><dd>Category_Recommendation_Builder</dd>
    <dt>dataItems</dt>
      <dd>
        <dl>
          <dt>listPrice_storeSiteUS</dt>
          <dt>highestPrice_storeSiteUS</dt>
          <dt>highestListPrice_storeSiteUS</dt>
          <dt>title_en</dt>
        </dl>
      </dd>
    <dt>-language</dt><dd>en</dd>
    <dt>-category_page</dt><dd>true</dd>
    <dt>-baseURL_storeSiteUS</dt><dd>/crs/storeus/</dd>
    <dt>-oldPriceText</dt><dd>was</dd>
    <dt>exclude</dt>
      <dd>
        <dl>
          <dt>xprod2032</dt>
          <dt>xprod2076</dt>
          <dt>xprod2024</dt>
          <dt>xprod2081</dt>
        </dl>
      </dd>
  </dl>
</div>

The content of the container <div> element on a top-level category page is generated by the store.war/browse/gadgets/categoryRecommendationsContainer.jsp gadget. This gadget checks for the existence of the /atg/store/recommendations/StoreRecommendationsConfiguration component, which is part of the Store.Recommendations module, and if this component is present, renders the content of the <div> element. For example, the gadget includes the following code to render the list of products that should be excluded from the Top Sellers list, since they are already being displayed under Featured Items:

<dsp:getvalueof var="relatedProducts" param="category.relatedProducts" />
<c:if test="${not empty relatedProducts}">
  <dt>exclude</dt>
  <dd>
    <dl>
      <c:forEach var="product" items="${relatedProducts}">
        <dt>${product.repositoryId}</dt>
      </c:forEach>
    </dl>
  </dd>
</c:if>

The content of the container <div> element on a product detail page 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. It 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>