In this lesson, you verify that your new widget can be
used on the Shopping Cart page for your store.
About this task
Since you converted the default ShopCartDisplay.jsp JSP
file to be a site level widget, you can use your new widget to replace
the ShopCartDisplay.jsp file. By default the OrderItemDisplay.jsp file
calls the ShopCartDisplay.jsp JSP file. Update
the OrderItemDisplay.jsp file to call your new
widget instead of the ShopCartDisplay.jsp file.
Procedure
- Open your development environment, in the Enterprise
Explorer view.
- Go to Stores\WebContent\Aurora\ShoppingArea\ShopcartSection
- Open the file OrderItemDisplay.jsp for
editing
- Locate the following code:
<c:import url="/${sdb.jspStoreDir}/ShoppingArea/ShopcartSection/ShopCartDisplay.jsp"/>
Change the code to the following line:
<c:import url="/Widgets-MyCompany/com.mycompany.commerce.store.widgets.ShoppingCartDetail/ShoppingCartDetail.jsp"/>
Now,
the
OrderItemDisplay.jsp file calls the widget
that you created.
- Save and close the file.
- Start or restart the WebSphere Commerce
Test Server.
- Open the Aurora starter store in a web browser. Add a product
to your Shopping Cart, and go to your cart to
view the Shopping Cart page. Your Shopping
Cart page can resemble the following image.
Your
Shopping Cart page now displays
your custom widget to provide the body content of the page.