<flow:ifEnabled> custom JSP tags. As a result, the JSP page will display the thumbnail images dependent upon the status of the ShoppingCartImages feature (that is, enabled or disabled)." name="abstract"/> <flow:ifEnabled> custom JSP tags. As a result, the JSP page will display the thumbnail images dependent upon the status of the ShoppingCartImages feature (that is, enabled or disabled)." name="description"/> Make the feature configurable

Tutorials > Customize the Consumer Direct sample store > Add a new Change Flow feature

< Previous | Next >


Make the feature configurable

In this step of the tutorial, we will make the new feature configurable through the Change Flow notebook using the <flow:ifEnabled> custom JSP tags. As a result, the JSP page will display the thumbnail images dependent upon the status of the ShoppingCartImages feature (that is, enabled or disabled).


Procedure

  1. Navigate to the following directory:

  2. Open the Cart JSP file, CurrentOrderDisplay.jspf, for editing.

  3. Locate the following in CurrentOrderDisplay.jspf:

    <c:choose>
          
    <c:when test="${!empty catalogEntry.description.thumbNail}">           
                   
    <a href="<c:out value="${ProductDisplayURL}"/>" 
                    ${status.count}"/>">                
                           
    <img width="75" height="75" ${catalogEntry.description.shortDescription}"/>" 
                            src="<c:out value="${catalogEntry.objectPath}"/><c:out value="${catalogEntry.description.thumbNail}"/>" 
                            border="0">                
                   
    </a>
           
    </c:when>
           
    <c:otherwise>              
                   
    <img width="75" height="75" No_Image" bundle="${storeText}"/>" 
                    src="<c:out value="${jspStoreImgDir}" />images/NoImageIcon_sm.jpg" border="0">
           
    </c:otherwise>
    </c:choose>
    

  4. Enclose the JSP code in the previous step in an ifEnabled element for the ShopCartImages feature:

    <flow:ifEnabled feature="ShoppingCartImages"><c:choose>
           
    <c:when test="${!empty catalogEntry.description.thumbNail}">           
                   
    <a href="<c:out value="${ProductDisplayURL}"/>" 
                    ${status.count}"/>">                
                           
    <img width="75" height="75" ${catalogEntry.description.shortDescription}"/>" 
                            src="<c:out value="${catalogEntry.objectPath}"/><c:out value="${catalogEntry.description.thumbNail}"/>" 
                            border="0">                
                   
    </a>
           
    </c:when>
           
    <c:otherwise>              
                   
    <img width="75" height="75" No_Image" bundle="${storeText}"/>" 
                    src="<c:out value="${jspStoreImgDir}" />images/NoImageIcon_sm.jpg" border="0">
           
    </c:otherwise>
    </c:choose>
    </flow:ifEnabled>
    

  5. Save and close the file.

  6. If the Web container is not configured to reload JSP pages, restart your WCS instance.

  7. Refresh the view of the shopping cart of the consumer direct sample store. Verify that the thumbnail images are no longer displayed: the feature is disabled by default.

  8. To manually enable the feature, follow the instructions for changing store flows. Ensure that you select the Shop Cart tab from the navigation frame, click the Enable thumbnail images for shopping cart items check box to enable the feature, and click Apply.

  9. Refresh the view of the shopping cart of the consumer direct sample store. Verify that the thumbnail images are once again displayed in the Item column for each item on the Shopping cart page.

< Previous | Next >


+

Search Tips   |   Advanced Search