Tutorials > Management Center > Add new fields in the Catalogs tool
Test the customization
In this lesson, you verify that the customization is successful. You can do this either by testing in the Management Center, or by viewing the contents of a BOD message.
Test the customization by using either of these methods:
Procedure
- Test the customization in the Catalogs tool
- Start the WebSphere Commerce Server.
- In the Web browser, enter the URL: https://localhost:8000/lobtools.
- Open the Management Center tool by using the category manager you registered previously.
- Click Catalogs under the top left menu Management Center to enter into Catalogs tool.
- Select ConsumerDirect store.
- From the explorer tree, navigate to ConsumerDirect > Furniture > Lounge Chairs. The following screen displays the catalog entries list:
- The WarrantyTerm value for each product defaults to the current value which is stored in the server warranty table
- In our example, under subCategory Lounge Chairs, the products White Fabric Roll Arm Chaise with catentry_id 10251, White Fabric Roll Arm Chaise with catentry_id 10253 and White Wing Chair with catentry_id 10255 are used to track the customization change. Those catentry_ids listed here are examples only, the value can be set by the users accordingly.
- Right-click White Fabric Roll Arm Chaise and select Open. The Properties view opens.
- Click on the newly created Warranty tab. The values for both Warranty Term and Warranty Type for each product defaults to the current value which is stored in the server warranty table.
- Browse the list option values for warranty term and warranty type and make a choice.
- Change the Warranty Term value from 30 to be 60, and the Warranty Type from limited to be comprehensive, then click on Save and Close. The changed values will be saved along the server database. The value change is shown as the following:
List view: Product list table
Property panel view: Warranty tab
Database view: XWarranty table
- Test the customization by viewing the BOD contents. When passing the user data between commerce server and LOB tool client side, sometimes the data does not display as expected. Verify the BOD files really contain the custom data by viewing the contents of a BOD. Since BOD messages are event-driven, after each action, a BOD might be created depending on what the action entails. By default, tracing of BOD messages is turned off.
To turn it on, do the following steps:
- Open WebSphere Application Administrative Console: http://localhost:9060/ibm/console/
- Click Login without typing in the user ID information.
- Expand Troubleshooting and select Logs and Trace.
- Select Server1.
- Select Change Log detail Levels.
- Enable the trace com.ibm.commerce.foundation.server.command.bod as shown in the following screen capture:
If the trace is enabled in the Runtime environment, the BOD message is displayed immediately after you reproduce the scenario without restarting the server. If the server is restarted, the trace needs to be re-enabled, otherwise the BOD message is not shown.
On the other hand, if the trace is enabled, the BOD message will be shown up after restarting the server and reproducing the scenario.
- The request and response BOD will be traced in the log under the directory: WCDE_INSTALL\wasprofile\logs\server1\trace.log.
- Check the BOD message in the log file, the value for warranty Term and warranty Type will be included in the UserData section. The following screen capture shows the userdata which is extracted from the trace log:
The catentry_ids listed here are examples only. The correct values can be found in the prerequisite tutorial.
Lesson checkpoint
The following customization has been completed so far in the tutorial:
- Update the WebSphere Commerce schema to store warranty information.
- Customize the Catalog service to include the warranty information as user data in the CatalogEntry noun.
- Add custom queries to a custom query template file.
- Customize the Catalogs tool
- Add new fields in the list view.
- Add a new tab in the details view.
- Add new fields in the new tab.
- Create an extension property file.
- Create combo boxes with default selections for the new data fields.