My Cart portlet JSP sample

The shopping cart portlet displays shopping cart details to customers.

From this portlet customers can do the following tasks:

The offer price for each of the items in the cart is shown. When this portlet appears the first time, MVCPortlet_installdir/jsp/html/default/MyCart.jsp is used.

image goes here

Interactions

Customer action Portlet response Called WebSphere Commerce Services
Customer clicks the item name. The product item details are displayed in the Product portlet. GetCatalogEntryDetailsByIDs - Gets detailed information of a given set of catalog entries.
Customer updates the quantity of an item. The quantity of an item is updated. updateOrderItem (OrderItemUpdate) - Update quantity for some items in the shopping cart.
Customer clicks the remove icon. OrderItemDelete is called and the item is removed from the shopping cart. deleteOrderItem (OrderItemDelete) - Remove an item from a shopping cart.
Customer clicks the checkout icon. Address Book view appears in the My Account portlet on the same portal page. Customer can look at their address book and make any changes to entries while completing the order. In addition, another event is issued to the My Cashier portlet to display the checkout page. No Web service is called directly for checkout. Instead, the portlet remains, displaying contents of the shopping cart.
When the portlet first starts up or a refresh is performed on this portlet. Displays the MVCPortlet_installdir/jsp/html/default/MyCart.jsp page which shows the shopping cart contents of the current customer. findCurrentShoppingCart - Returns detailed information of an order in pending state, such as quantity and prices under each order item of the shopping cart.


Related concepts

WebSphere Commerce integration with WebSphere Portal Portlet packaging structure


Related tasks

Configure WebSphere Portal with WebSphere Commerce Configure the sample portlets in the development environment


Related reference

WebSphere Commerce portlet samples - - -