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

< Previous | Next >


Examine the search result table definition

At this point in the tutorial, you can search for a product using the CATENTRY.MFPARTNUMBER field, but the manufacturer's part number does not display as part of the search result. For example, if you perform a wildcard search for mymfpart*, search results will return, but we will not know the actual the value of manufacturer part number. The steps in this section of the tutorial describe how to display the new search term in the search result table.

The first step in displaying the new search term in the search result table is to examine the existing definition for the search result table:


Procedure

  1. In the IBM Sales Center development environment, navigate to the com.ibm.commerce.telesales.ui.impl.find.product plug-in and open the fragment.xml file.

  2. Locate the following code:

    <extension
    point="com.ibm.commerce.telesales.widgets.tableDefinitions">
           
    <tableDefinition
    >
         
    <column
      
        resizable="true"
      minimumWidth="20"
     alignment="LEFT"
      modelPath="productType"
       managerType="findProductDialog"/>
         
    <column
      
          resizable="true"
     
    text="ProductSearchResultTableLabelProvider.table.column.sku"
         width="90"
            minimumWidth="20"
     alignment="LEFT"
      modelPath="productId"
         initialSort="true"/>
      
    <column
      
       resizable="true"
     
    text="ProductSearchResultTableLabelProvider.table.column.manufacturer"
        width="90"
            minimumWidth="20"
     alignment="LEFT"
      modelPath="manufacturer"/>
        
    <column
      
          resizable="true"
     
    text="ProductSearchResultTableLabelProvider.table.column.unitprice"
           width="90"
            minimumWidth="20"
     alignment="LEFT"
      modelPath="contractPrices.0.unitPrice"
        managerType="findProductDialog"/>
         
    </tableDefinition>
           
    </extension> 
    

  3. The columns that display in the search result table are defined by the column tags within the tableDefinition tag. Examine the column tags to determine what information the column contains. For example, the following column displays the short description of the product:

    <column 
            resizable="true"
           
    text="ProductSearchResultTableLabelProvider.table.column.description"
         width="170"
           minimumWidth="20"
     alignment="LEFT"
      modelPath="shortDescription"/>
    

< Previous | Next >


+

Search Tips   |   Advanced Search