Introduced in Feature Pack 2

Changing the default search type

You can change the default search type to limit or expand search results.

Procedure

  1. Open the SearchSetup.jspf file for editing:
    • WC_installdir/Stores.war/widgetdir/Common/SearchSetup.jspf
    • WebSphere Commerce DeveloperWCDE_installdir\workspace\Stores\WebContent\widgetdir\Common\SearchSetup.jspf
  2. Locate the following snippet, which sets the searchType value to 1000 by default:
    
    
    	<c:set var="searchType" value="${responseSearchType}" scope="request"/>
    	<c:if test="${empty searchType}" >
    		<c:set var="searchType" value="${WCParam.searchType}" scope="request"/>
    		<c:if test="${empty searchType}" >
    		
    			<c:set var="searchType" value="1000" scope="request"/>
    		</c:if>
    	</c:if>
    
  3. Update the search type according to the following table:
    OptionDescription
    0 ANY (INCLUDE products, kits, bundles, EXCLUDE product level SKUs and category level SKUs)
    1 EXACT (INCLUDE products, kits, bundles, EXCLUDE product level SKUs and category level SKUs)
    2 ALL (INCLUDE products, kits, bundles, EXCLUDE product level SKUs and category level SKUs)
    3 NONE (INCLUDE products, kits, bundles, EXCLUDE product level SKUs and category level SKUs)
    10 ANY (INCLUDE products, kits, bundles, product level SKUs, category level SKUs)
    11 EXACT (INCLUDE products, kits, bundles, product level SKUs, category level SKUs)
    12 ALL (INCLUDE products, kits, bundles, product level SKUs, category level SKUs)
    13 NONE (INCLUDE products, kits, bundles, product level SKUs, category level SKUs)
    100 ANY (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, kits, bundles)
    101 EXACT (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, kits, bundles)
    102 ALL (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, kits, bundles)
    103 NONE (INCLUDE product level SKUs, category level SKUs, EXCLUDE products, kits, bundles)
    1000 ANY (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs)
    1001 EXACT (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs)
    1002 ALL (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs)
    1003 NONE (INCLUDE products, kits, bundles, category level SKUs, EXCLUDE product level SKUs)
    10000 ANY (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs)
    10001 EXACT (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs)
    10002 ALL (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs)
    10003 NONE (INCLUDE category level SKUs, EXCLUDE products, kits, bundles, product level SKUs)
  4. Save your changes and close the file.

    The updated search type is applied upon saving the SearchSetup.jspf file.