Tutorials > Sales Center > Add a new search option in the IBM Sales Center


Load the completed tutorial code

You can load the completed tutorial code into the development environment instead of completing each step in the Add a new search term in the IBM Sales Center.

The following types of assets must be loaded:

Before loading the completed tutorial code, have published a store based on the consumer direct sample store.

The completed tutorial code is provided in the SearchTerm.zip file.


Procedure

  1. Unzip the sample tutorial code to a temporary directory, for example C:/temp. You will have the following two files:

    myNewExtensionsPluginCode.zip For the IBM Sales Center client development environment. Unzip the file...

    myNewExtensionsPluginCode.zip

    ...in the same temporary directory. You will have a directory structure similar to the following:

    C:/temp/plugins/myNewextensionsPlugin_1.0.0
    WebSphereCommerceServerExtensionsLogic.jar For the IBM WebSphere Commerce server development environment.

  2. Load the myNewExtensionsPluginCode.zip file into the IBM Sales Center development environment:

    1. Open the IBM Sales Center development environment.

    2. Click File > Import.

    3. From the Select an import source list, select External Plug-ins and Fragments. Click Next.

    4. In the Import External Plug-ins and Fragments window,

      1. Deselect The target platform (as specified in the Preferences).

      2. In the Plug-in Location field, enter or browse to the myNewExtensionsPlugin For example, C:/temp/plugins/myNewExtensionsPlugin_1.0.0.

      3. In the Import As section, select Projects with source folders.

      4. Click Next.

    5. In the Selection window,

      1. Select myNewExtensionsPlugin (1.0.0) and click Add.

      2. Click Finish.

  3. Load the WebSphereCommerceServerExtensionsLogic.jar file into the WebSphere Commerce development environment.

    1. Open WebSphere Commerce Developer.

    2. In the Enterprise Explorer view, navigate to Other Projects > WebSphereCommerceServerExtensionsLogic > src.

    3. From the src directory's pop-up menu select Import.

    4. From the Select an import source list, select Zip file. Click Next.

    5. In the From zip file field, enter or browse to the WebSphereCommerceServerExtensionsLogic.jar file in the temporary directory. For example, C:/temp/WebSphereCommerceServerExtensionsLogic.jar.

    6. Click Finish.

  4. To test the code:

    1. Ensure that a product in the database has manufacturer part number information:

      1. Open http://localhost/webapp/wcs/admin/servlet/db.jsp .

      2. Select a product catalog entry and ensure it has data in its manufacturer part number column. For example, if you published the consumer direct sample store with the housewares catalog, you might enter the following SQL statement if 10025 is a valid catentry_id: select mfpartnumber from catentry where catentry_id=10025; and pressing Submit Query.

      3. If the product catalog entry already has a manufacturer part number, use that part number in the next step.

      4. If the product catalog entry's manufacturer part number is NULL, add data into the mfpartnumber column by entering the following SQL statement: update catentry set mfpartnumber='mymfpartnumber' where catentry_id=10025; and pressing Submit Query.

    2. Follow the instructions in Test the changes.


+

Search Tips   |   Advanced Search