Introduced in Feature Pack 3

Adding a new tab to the Product Display page

Introduced in Feature Pack 3 In this lesson, you modify the storefront JSP files to display warranty information. The CachedProductOnlyTabsExt.jspf and CachedProductOnlyTabPanesExt.jspf are provided as extension points for creating additional tabs. You also add some additional data in the storetext.properties file which allows for translation in the storefront.

Procedure

  1. Open the following file:
    • WebSphere Commerce DeveloperWCDE_installdir\workspace\Stores\src\Madisons\storetext.properties
  2. Append the following snippet into the file:
    
    #-----------
    #Warranty
    #-------------
    WARRANTY=Warranty
    WARRANTYTERM=Warranty Term
    WARRANTYTYPE=Warranty Type
    CAREINSTRUCTION=Care Instructions
    
  3. Save your changes and close the file.
  4. Open the following file:
    • WebSphere Commerce DeveloperWCDE_installdir\workspace\Stores\WebContent\Madisons\Snippets\Catalog\CatalogEntryDisplay\CachedProductOnlyTabsExt.jspf
  5. Copy the following snippet into the file:
    
    <%-- 
    This is the code that displays when the warranty tab is clicked.  The "WARRANTY" value is defined in storetext.properties
    --%>
    <span class="on" id="Warranty_On" style="display:none">
           <span class="left_corner">&nbsp;</span>
    	   <span class="text"><fmt:message key="WARRANTY" bundle="${storeText}" /></span>
    	 <span class="right_corner">&nbsp;</span>
    </span> 
    <%--
    This is the code that displays when the warranty tab is not selected. 
    --%>
    <span class="off" id="Warranty_Off" style="display:inline">
        <a href="javascript:selectTab('Warranty');" class="catalog_link" id="warranty_links_1">
        <span class="text"><fmt:message key="WARRANTY" bundle="${storeText}" /></span></a>
    </span>
    
  6. Save your changes and close the file.