Tutorials > Customize the Consumer Direct sample store > Customizing the consumer direct sample store using snippets

< Previous | Next >


Display the MyApparelSpot e-Marketing Spot

You will modify the CachedHeaderDisplay.jsp file to display the new e-Marketing Spot. If you completed the section on using the sales catalog JSP code snippet, the e-Marketing Spot will display just below the sales catalogs.

To display the e-Marketing Spot:


Procedure

  1. In the Enterprise Explorer view, navigate to Stores > Web Content > MyApparelStore > include > styles > style1.

  2. Right-click the CachedHeaderDisplay.jsp file and select Open With > Source Editor.

  3. Scroll to the bottom of the file and find the following code:

    <tr>
       
    <td>
           
    <table>
                   
    <!--Start Sales Catalog JSP code snippet -->
                   
    <tr><td>
                
    <c:import url="${jspStoreDir}include/StoreCatalogDisplay.jsp" />
                    
    </td></tr>
                   
    <!--End Sales Catalog JSP code snippet -->
           
    </table>
           
    </td>
    </tr>
    

  4. Above the </table> tag, add the following code:

    <!--Start e-Marketing Spot JSP code snippet -->
    <tr>
       
    <td>
           
    <c:import url="${jspStoreDir}include/eMarketingSpotDisplay.jsp">
           
    <c:param name="emsName" value="MyApparelSpot" />
           
    <c:param name="catalogId" value="${WCParam.catalogId}" />
           
    </c:import>
       
    </td>
    </tr>
    <!--End e-Marketing Spot JSP code snippet -->
            
    

    The e-Marketing Spot JSP code snippet is in the Stores/Web Content/include/eMarketingSpotDisplay.jsp file. The snippet requires two parameters, ems and catalogId.

    • The ems parameter is the name of the e-Marketing Spot, in this case, MyApparelSpot.

    • The catalogId parameter is the identifer of the catalog. In this case, you use a WCParam object to get the value of the implicit JSP object.

  5. Save the changes.

< Previous | Next >


+

Search Tips   |   Advanced Search