Tutorials > Sales Center > Add a column to the order items table

< Previous | Next >


Register the WebSphere Commerce Server Extension

BODs consist of nouns and verbs. The IBM Sales Center registry files define which class runs for different noun-verb combinations. In this case, instead of the default ShowElectronicCatalog class, you want the ExtendedShowElectronicCatalog class to run.

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


Procedure

  1. Navigate to WC_EAR/xml/messaging and examine the default registry file:

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

  3. 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, because 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.

  4. In the WC_EAR/xml/messaging directory, create a new text file named TelesalesRegistry-ext.xml.

  5. Enter the following text in the new file.

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

    Note: When you enter this text ensure that the class name definition between the <ClassName></ClassName> tags is contiguous and all on one line.

  6. Navigate to WC_EAR/xml/config

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

  8. Locate the following text:

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

  9. 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"
            customRegistryPath="messaging"
            display="false" enableBaseRegistryOverride="true" />
    

  10. Save and close the file.

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

    1. In the Servers view, right-click the WebSphere Commerce Test Server and select Stop.

    2. When the status column displays Stopped, right-click the WebSphere Commerce Test Server and select Start. Wait until the status column displays Started.

< Previous | Next >


+

Search Tips   |   Advanced Search