Testing the customization

In this lesson, you verify that your customization is successful. To verify the customization, you can test the customization in Management Center, or by viewing the contents of a BOD message.

About this task

Test the customization by using either of these methods:

Procedure

  1. Test the customization in the Catalogs tool
    1. Start the WebSphere Commerce Server.
    2. In a web browser, enter the URL: https://localhost:8000/lobtools.
    3. Open Management Center with the category manager Id you registered previously.
    4. Click Mangement Center tools > Catalogs.
    5. Select your store.
    6. From the explorer view, navigate to the catalog entries list view that contains products that you added warranty information for during the prerequisite tutorial.
      For example, the following screen displays the catalog entries list containing products with warranty term information:

      Catalog entry list view with warranty term

    7. Right-click a product that contains warranty information and select Open. The Properties view for the catalog entry opens.
    8. Click the newly created Warranty tab. The values for both warranty term and warranty type for each product defaults to the current value that is stored in the server warranty table.
      Properties view warranty tab
    9. Change the Warranty Term value from 30 to be 60, and the Warranty Type from limited to be comprehensive, then click Save and Close. The changed values are saved in the database.
  2. 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. Ensure that 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:

    1. Open WebSphere Application administrative console. URL: http://localhost:9060/ibm/console/
    2. Click Login without typing in the user ID information.
    3. Expand Troubleshooting and select Logs and Trace.
    4. Select Server1.
    5. Select Change Log detail Levels.
    6. Enable the trace com.ibm.commerce.foundation.server.command.bod=all as shown in the following screen capture:
      Log details level
      Note: 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 must be re-enabled, otherwise the BOD message is not shown.
    7. The request and response BOD is traced in the log under the directory: WCDE_installdir\wasprofile\logs\server1\trace.log.
    8. Check the BOD message in the log file, the value for warranty Term and warranty Type is included in the UserData section. The following screen capture shows the UserData information that is extracted from the trace log:

      BOD message with warranty information

Results

The following customization is complete 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
    1. Add new fields in the list view.
    2. Add a tab in the catalog entry properties view.
    3. Add new fields in the new tab.
    4. Create an extension property file.
    5. Create combination boxes with for the new data fields.