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

< Previous | Next >


Register the new search option code

This section refers to registering the new search option code.

Modify the registry file so that ExtendedShowElectronicCatalog is called instead of ShowElectronicCatalog:


Procedure

  1. Navigate to WC_EAR/xml/messaging.

  2. Examine the default registry file:

    1. Open the TelesalesRegistry.xml file in a text editor.

    2. Locate the following text :

      <Noun name="ElectronicCatalog">
             
      <Verb name="Get">
                     
      <ClassName>com.ibm.commerce.telesales.messaging.bodreply.ShowElectronicCatalog</ClassName>
             
      </Verb>
      </Noun>
      

      Instead of the com.ibm.commerce.telesales.messaging.bodreply.ShowElectronicCatalog class, you want the new ExtendedShowElectronicCatalog class to run. It is possible to edit the TelesalesRegistry.xml file to point to your ExtendedShowElectronicCatalog class, but it is not recommended, since the TelesalesRegistry.xml file might be altered by a fixpack or migration. Instead, we will create a new registry file that will override the TelesalesRegistry.xml file.

  3. In the same directory, create a new text file named TelesalesRegistry-ext.xml.

  4. Enter the following text in the new file.

    <WCTBodResponseBuilderRegistry>
           
    <Noun name="ElectronicCatalog">
                   
    <Verb name="Get">
                           
    <ClassName>com.mynewextensions.mfpartnumber.ExtendedShowElectronicCatalog</ClassName>
                   
    </Verb>
           
    </Noun>
    </WCTBodResponseBuilderRegistry>
    

  5. Navigate to WC_EAR/xml/config

  6. Open the file wc-server.xml in a text editor.

  7. Locate the following text:

    <property
            baseRegistryFileName="TelesalesRegistry.xml"
            baseRegistryFilePath="messaging"
            customRegistryFileName=""
            customRegistryFilePath=""
            display="false" enableBaseRegistryOverride="false" />
    

  8. Modify the preceding text to include the new registry file and set enableBaseRegistryOverride property to true. Your text should match the following:

    <property
            baseRegistryFileName="TelesalesRegistry.xml"
            baseRegistryFilePath="messaging"
            customRegistryFileName="TelesalesRegistry-ext.xml"
            customRegistryFilePath="messaging"
            display="false" enableBaseRegistryOverride="true" />
    

  9. Save and close the file.

  10. Restart the WebSphere Commerce Test Server so that the server reflects the change to the wc-server.xml file.

< Previous | Next >


+

Search Tips   |   Advanced Search