This tutorial guides you through the steps involved in creating a dynamic context relationship between two Commerce Enabled Portal portlets. A dynamic context relationship is created when one portlet displays content dependent on the content of another portlet. In this tutorial you will create a dynamic context relationship between the shopping cart portlet and the product display portlet. In this scenario, a customer will be able to select a product in the shopping cart and display only the product information for that product, for example the product description and image. As a result, the content of what displays in the product display portlet is dependent on the product ID in the shopping cart portlet.
As part of this tutorial, you will do the following:
- Create a new Commerce Enabled Portal portlet
- Edit the ProductOnlyDisplay.jsp file
- Define a dynamic context relationship
At the end of this tutorial you will have created a relationship between the two Commerce Enabled Portal portlets.
Pre-requisites
Before you start this tutorial, you must do the following:
- Install the Commerce Enabled Portal development environment, including publishing the consumer direct Commerce Enabled Portal starter store.
- Download the sample code provided for these tutorials. For more information, see Commerce Enabled Portal tutorials sample code.
- Complete the Commerce Enabled Portal tutorial: Understanding the development environment tutorial.
- Complete the Commerce Enabled Portal tutorial: Adding a WebSphere Commerce feature to a Commerce Enabled Portal tutorial.
Time required
You will need approximately 2 hours to complete the steps in this tutorial.
Starting the tutorial
To complete the tutorial, do the following: