Introduced in Feature Pack 2

Modifying the Madisons starter store to display the ratings information

Introduced in Feature Pack 2 In this lesson, the Madisons starter store is customized to display the ratings information with their associated catalog entries.

Procedure

  1. Open the following file:
    • Stores\WebContent\Madisons\Snippets\ReusableObjects\CatalogEntrySearchThumbnailDisplay.jspf
  2. Add the following code in the location where you want to display the ratings:
    
    <div>
    <c:forEach var="userDataField" items="${catEntry.userData.userDataField}">
    <c:if test="${userDataField.typedKey == 'Rating'}">
    <b>User Rating: ${userDataField.typedValue} </b>
    </c:if>
    </c:forEach>
    </div>
    
    If you want to display the ratings below the add to cart button, place this code after the closing <div> tag in the following location:
    </c:otherwise>
    </c:choose>
    </div>
    </c:when>
    <c:when test="${pageView == 'detailed'}>
  3. Save your changes and close the file.
  4. Restart the WebSphere Commerce server.
  5. The storefront now includes the ratings information:

    Storefront ratings