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:
- Changes to the IBM Sales Center development environment
- Changes to the WebSphere Commerce development environment
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
- 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.0WebSphereCommerceServerExtensionsLogic.jar For the IBM WebSphere Commerce server development environment.
- Load the myNewExtensionsPluginCode.zip file into the IBM Sales Center development environment:
- Open the IBM Sales Center development environment.
- Click File > Import.
- From the Select an import source list, select External Plug-ins and Fragments. Click Next.
- In the Import External Plug-ins and Fragments window,
- Deselect The target platform (as specified in the Preferences).
- In the Plug-in Location field, enter or browse to the myNewExtensionsPlugin For example, C:/temp/plugins/myNewExtensionsPlugin_1.0.0.
- In the Import As section, select Projects with source folders.
- Click Next.
- In the Selection window,
- Select myNewExtensionsPlugin (1.0.0) and click Add.
- Click Finish.
- Load the WebSphereCommerceServerExtensionsLogic.jar file into the WebSphere Commerce development environment.
- Open WebSphere Commerce Developer.
- In the Enterprise Explorer view, navigate to Other Projects > WebSphereCommerceServerExtensionsLogic > src.
- From the src directory's pop-up menu select Import.
- From the Select an import source list, select Zip file. Click Next.
- In the From zip file field, enter or browse to the WebSphereCommerceServerExtensionsLogic.jar file in the temporary directory. For example, C:/temp/WebSphereCommerceServerExtensionsLogic.jar.
- Click Finish.
- To test the code:
- Ensure that a product in the database has manufacturer part number information:
- Open http://localhost/webapp/wcs/admin/servlet/db.jsp .
- 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.
- If the product catalog entry already has a manufacturer part number, use that part number in the next step.
- 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.
- Follow the instructions in Test the changes.