Modifying the Aurora starter store to display the custom data

In this lesson, you customize the Aurora starter store to display the customer ratings information for catalog entries.

Procedure

  1. If you are customizing a local store, in the Enterprise Explorer view, expand Stores > WebContent > widgetdir > Common > CatalogEntry. For crsServer stores, in the Enterprise Explorer view, expand crs-web > WebContent > widgetdir > Common > CatalogEntry > .
  2. Open the CatalogEntryDisplay_GridView_UI.jspf file for editing.
  3. Locate the <div class="product_info"> section within the file.
  4. Add the following code within this element after the code that defines the <div class="product_name"> element.
    
    <c:choose>
      <c:when test="${!empty catalogEntryDetails.UserData[0].x_customerRanking}"> 
        <div>
          <c:out value="Rating : ${catalogEntryDetails.UserData[0].x_customerRanking}"/>
        </div>		
      </c:when>
      <c:otherwise>
        <div>
          <c:out value="Rating : N/A"/>
        </div>	
      </c:otherwise>
    </c:choose>
    
  5. Save and close the file.
  6. Open your storefront in a web browser. Search for the keyword "dress". Within the search results, the product ratings should display for the catalog entries that include a rating.
    The keyword "dress" is used as an example in this tutorial. The search term that you need to use might vary depending on the customized data that you added.


Results

If the ratings data displays in your storefront search results correctly, your customization is successful. You can now deploy your customization to your production environment.