WebSphere Commerce portlet samples
A portlet is a reusable Web module that processes requests and generates dynamic content.It is a complete application and has the following features:
- multiple states
- multiple views
- messaging capabilities
- event capabilities
Portlets run on a portal server and have predefined roles such as retrieving news headlines, searching a database, or displaying a calendar. The WebSphere Commerce portlets, when working together using cooperative portlet wires, can provide customers with a similar shopping experience to that of the WebSphere Commerce consumer direct storefront, while providing merchants with additional online business sales channels to other portal environments.
The following portlet samples make up the WebSphere Commerce portal:
- My Account portlet JSP sample
- Catalog portlet JSP sample
- Cashier portlet JSP sample
- Search portlet JSP sample
- My Order portlet JSP sample
- Product portlet JSP sample
- My Cart portlet JSP sample
For more information about portlets, refer to Portlets, in the WebSphere Portal Information Center.
Portlet samples shopping flow
The following diagram displays the shopping flow for an authenticated user in the WebSphere Commerce portlets.
The following diagram displays the shopping flow for an anonymous user in the WebSphere Commerce portlets.
Only two portlets can be made available to anonymous users due to a technical restriction with WebSphere Portal Server where portlet wire actions cannot be triggered by anonymous users. Refer to the Known issues and restrictions with cooperative portlets topic in the WebSphere Portal Server Information Center for more details.
- My Account portlet JSP sample
The My Account portlet provides customers with the ability to create, change, remove.- Cashier portlet JSP sample
The Cashier portlet is displayed when customers click on the checkout icon in the My Cart portlet.- Catalog portlet JSP sample
The catalog portlet displays a list of all active sales catalogs. When this portlet appears the first time, MVCPortlet_installdir/jsp/html/default/Catalog.jsp is used.- Search portlet JSP sample
The Search portlet provides customers with the ability to search on a product name and description. The result is shown in the Product portlet. When this portlet appears the first time, MVCPortlet_installdir/jsp/html/default/Search.jsp is used.- My Order portlet JSP sample
The My Order (order history) portlet provides customers with the ability to view Order history and Order history details.- Product portlet JSP sample
The Product portlet displays product details to customers. From this portlet customers can select items to add to the shopping cart. When this portlet appears the first time, MVCPortlet_installdir/jsp/html/default/Product.jsp is used. For each product, the offer price is shown. Certain items will not have a price shown. For general products and bundles, the offer price is not available until the item is added to the shopping cart.- My Cart portlet JSP sample
The shopping cart portlet displays shopping cart details to customers.- Predefined expression builders in the WebSphere Commerce portlet samples
The WebSphere Commerce portlet samples provide many predefined expression builders which can be reused to call WebSphere Commerce services. These expression builders are defined in the component-name/get-data-config.xml files.
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
Predefined expression builders in the WebSphere Commerce portlet samples - - -