Tutorials > Sales Center > Add a new search option in the IBM Sales Center
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
- Navigate to WC_EAR/xml/messaging.
- Examine the default registry file:
- Open the TelesalesRegistry.xml file in a text editor.
- 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.
- In the same directory, create a new text file named TelesalesRegistry-ext.xml.
- Enter the following text in the new file.
<WCTBodResponseBuilderRegistry> <Noun name="ElectronicCatalog"> <Verb name="Get"> <ClassName>com.mynewextensions.mfpartnumber.ExtendedShowElectronicCatalog</ClassName> </Verb> </Noun> </WCTBodResponseBuilderRegistry>
- Navigate to WC_EAR/xml/config
- Open the file wc-server.xml in a text editor.
- Locate the following text:
<property baseRegistryFileName="TelesalesRegistry.xml" baseRegistryFilePath="messaging" customRegistryFileName="" customRegistryFilePath="" display="false" enableBaseRegistryOverride="false" />
- 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" />
- Save and close the file.
- Restart the WebSphere Commerce Test Server so that the server reflects the change to the wc-server.xml file.