Introduced in Feature Pack 2

Troubleshooting: Displaying indexed prices in starter stores

Prices are displayed in starter stores using several approaches with WebSphere Commerce search.

Problem

Price ranges are not displayed in starter stores when the price mode is set to indexed (1) in WebSphere Commerce search.

Solution

To index and display price ranges in starter stores with WebSphere Commerce search:
  • Feature Pack 4Feature Pack 2Feature Pack 5Feature Pack 3Set the query property for price to mixed mode (2) in the extended wc-search.xml file. For more information, see WebSphere Commerce search configuration file (wc-search.xml) (WC EAR).
  • Feature Pack 6 or laterSet the Search profiles global defaults property for SearchProfilesPrice to mixed mode (2) in the extended wc-component.xml file. For more information, see Search properties in the component configuration file (wc-component.xml) (WebSphere Commerce EAR).
  • Feature Pack 7 or laterSet the wc.search.priceMode property to mixed mode (2) in the STORECONF table. For a complete description of the wc.search.priceMode settings and their effects, see Search configuration properties in the STORECONF table.
    Then, if you are changing the price mode to 0 or 2:
    1. Update your extended wc-search.xml file to include the following changes to enable the calculated prices features. The first configuration changes the category search profile.
      
      <_config:profile name="IBM_findProductsByCategory" indexName="CatalogEntry">
      <_config:query inherits="true">
      <_config:postprocessor classname="com.ibm.commerce.foundation.server.services.rest.search.postprocessor.solr.SolrRESTSearchCatalogEntryViewSKUQueryPostprocessor"/>
      <_config:postprocessor classname="com.ibm.commerce.foundation.server.services.rest.search.postprocessor.solr.SolrRESTSearchCatalogEntryViewComponentsQueryPostprocessor"/>
      </_config:query>
      <_config:result inherits="true">
      <_config:field name="components"/>
      </_config:result>
      </_config:profile> 
      
      In order for correct price ranges to appear in the results, also change the search result profile, using the same code.
      <_config:profile name="IBM_findProductsBySearchTerm" indexName="CatalogEntry">
      <_config:query inherits="true">
      <_config:postprocessor classname="com.ibm.commerce.foundation.server.services.rest.search.postprocessor.solr.SolrRESTSearchCatalogEntryViewSKUQueryPostprocessor"/>
      <_config:postprocessor classname="com.ibm.commerce.foundation.server.services.rest.search.postprocessor.solr.SolrRESTSearchCatalogEntryViewComponentsQueryPostprocessor"/>
      </_config:query>
      <_config:result inherits="true">
      <_config:field name="components"/>
      </_config:result>
      </_config:profile> 

      These postprocessors are disabled by default for performance considerations. The following describes why they are needed for calculated price modes:

      The SolrRESTSearchCatalogEntryViewSKUQueryPostprocessor is required so that SKUs are retrieved from Solr in the same request as products in search results.

      For example, when viewing search results in grid mode, this enables price ranges to be displayed for all SKus and contracts. When viewing search results in list mode, this enables products with a single SKU the ability to be added to the shopping cart.

      The SolrRESTSearchCatalogEntryViewComponentsQueryPostprocessor is required so that components of a dynamic kit are retrieved from Solr in the same request as dynamic kits in search results.

      For example, when viewing search results for components, the price is displayed. With the postprocessor disabled, the price will be pending.

    2. Deploy the changes to the search server.
    3. Restart the WebSphere Commerce search server.