Feature Pack 4 or later

Using short descriptions for mobile product pages

Feature Pack 4 or laterEach product entry has two description fields, a long and short description, which can be used to suit channel-specific needs. With mobile browsers, a shorter product description might be preferred to optimize the limited display area. In this lesson, you will modify the Madisons mobile starter store CachedProductDisplay.jsp so that product short descriptions are retrieved when the product display page is viewed using a mobile device.

Procedure

  1. Edit the CachedProductDisplay.jsp, which contains a parameter that determines whether to retrieve the long or short description:
    1. Open WebSphere Commerce Developer.
    2. From the Enterprise Explorer view, expand Stores > WebContent > Madisons > mobile20 > Snippets > Catalog > CatalogEntryDisplay.
    3. Open CachedProductDisplay.jsp.
    4. Locate the following code snippet:
      
      <p><c:out value="${product.description.longDescription}" escapeXml="false"/></p>
      
    5. Replace the snippet with the following code:
      
      <p><c:out value="${product.description.shortDescription}" escapeXml="false"/></p>
      
    6. Save your changes and close the file.
  2. Verify the changes by launching a browser and viewing a product page. The product's short description should be displayed. You can confirm this by opening the corresponding product entry in the Management Center.