Tutorial: Adding a column to the order items table
Attention: This tutorial is currently under revision. The content might contain errors or inaccuracies. Subscribe to this page to be notified when an updated version is available.
In this tutorial you modify the order items table in the IBM Sales Center to display an additional column.
Learning objectives
In this tutorial we will modify the order items table in the IBM Sales Center to display an additional column with the heading Availability Date along with the availability date of the item. The following screen capture displays the default order items table in the IBM Sales Center:
After the tutorial, the order items table displays in the IBM Sales Center with the Availability Date column on the extreme right as shown in the following screen capture:
Time required
Expect this tutorial to take 2 hours to complete.
Audience
This tutorial is intended for WebSphere Commerce developers who will be responsible for customizing the IBM Sales Center.
Prerequisites
To complete this tutorial you should be familiar with the following terms and concepts:
- Eclipse plug-ins
- Java programming language
- Rational Application Developer
- relational databases
Before beginning this tutorial ensure you have:
- Installed the development environment for both IBM Sales Center and WebSphere Commerce
- Published a starter store
Lessons in this tutorial
- Create a customer and an order
In this tutorial it is necessary to have an existing order in pending state in WebSphere Commerce. If you have a order in pending state and know its order number, skip this step.
- Determine the ID of the user interface widget to modify
In this step we will determine which user interface element of the IBM Sales Center to extend and gather the necessary information about the extension point.
- Create a new plug-in
In this step, we will create a new plug-in that contains a new definition of the order items table. Your new definition overrides the base product definition. The new table definition is the same as the base definition with an additional Availability Date column.
- Specify required plug-ins for the new plug-in
In this step, you define which plug-ins the plug-in depends upon. Similar to import statements in a Java class, you have to import these plug-ins in order to provide services or features required for newly created plug-in. For example, com.ibm.commerce.telesales.widgets has the widget definitions and descriptor required for access to the widgets. You get a build error if do not define the dependency of plug-ins for the new project.
- Register custom extension with system configurator
In this step you register custom extension with system configurator.
- Create a properties file for the new order items table
In this step, we will create a properties file that contains text for the new table column, and add an entry to the availabilityDate plug-in to point to the new properties file.
- Create a new definition for the user interface widget
In this step we will create the own definition of the order items table. In a later step in this tutorial we will use the system configurator to indicate the IBM Sales Center should display this definition, not the default definition.
- Point to the new widget definition
In the previous step, you created a customized version of the order items table. In this step, we will create a file that indicates that the custom definition should be used instead of the default definition.
- Test the user interface changes
This section is about testing the user interface changes.
- Extend the reply BOD from the WebSphere Commerce Server
In this step we will extend the reply Business Object Document (BOD) to include the availability date when information about an order is sent from the WebSphere Commerce Server to the IBM Sales Center client. You will perform this step using the WebSphere Commerce development environment.
- Register the WebSphere Commerce Server Extension
BODs consist of nouns and verbs. The IBM Sales Center registry files define which class runs for different noun-verb combinations. In this case, instead of the default ShowElectronicCatalog class, you want the ExtendedShowElectronicCatalog class to run.
- Verify the customization is successful
In this section you verify if the customization is successful.
- Deploy the changes
This step refers to deploying the changes you made in the earlier steps.