<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"/>
Tutorials > Customize the Consumer Direct sample store > Add a new Change Flow feature
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
- Navigate to the following directory:
- WC_eardi../images/locale/screensnap/Stores.war/ConsumerDirect/ShoppingArea/ShopcartSection
- workspace_dir\wc\Stores\Web Content\ConsumerDirect\Snippets\Order\Cart
- Open the Cart JSP file, CurrentOrderDisplay.jspf, for editing.
- 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>
- 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>
- Save and close the file.
- If the Web container is not configured to reload JSP pages, restart your WCS instance.
- 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.
- 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.
- 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.