HCL Commerce Version 9.1.12.0 or later

Enabling price facet hiding and sequencing

Follow the steps given in this document to enable the price facet hiding and sequencing in both e-site and CAS models.

About this task

This document only applies to HCL Commerce version 9.1.12 and 9.1.15.2.

Procedure

  1. For e-site model:
    1. Obtain SRCHATTR_ID. Run the following SQL query to retrieve the SRCHATTR_ID for the offer price in store-supported currency, such as US dollar, and note down the SRCHATTR_ID for example, -1016.
      SELECT * FROM SRCHATTR WHERE IDENTIFIER LIKE '%OfferPrice_USD';
    2. Obtain DatabaseCategoryStage1b.sql.
      Navigate to the current Nifi image and copy the DatabaseCategoryStage1b.sql from the Nifi image. Use the following command in the docker-compose environment:
      docker cp commerce_nifi_1:/opt/nifi/nifi-current/extensions/commerce-search-processors-nar-<release>.nar ./
      Extract the DatabaseCategoryStage1b.sql from the nar file using a zip tool such as 7-zip. Locate the SQL file within the extracted files at the following location: META-INF\bundled-dependencies\commerce-search-processors-<release>.jar\sql\
    3. Modify the DatabaseCategoryStage1b.sql.
      Open the DatabaseCategoryStage1b.sql file and add SRCHATTR obtained from 1.a to the following section and save the modifications made to the file - For example, -1016.
      WHERE SA.SRCHATTR_ID = F.SRCHATTR_ID AND SA.SRCHATTR_ID IN (-1002, -1013, -1101, -1016)
    4. Configure the Nifi user interface. In the NIFI user interface, navigate to the following processors and execute the given steps:
      • auth.reindex - Category Stage 1b (Find Facets)
      • auth.category - Category Stage 1b (Find Facets)
      • dataload.category - Category Stage 1b (Find Facets)
      1. Find the corresponding property related to executing SQL.
      2. Update the Custom SQL Value by copying the content of the modified DatabaseCategoryStage1b.sql file.
      3. Remove leading whitespace characters from the SQL to avoid any issues.
      4. Set Use Custom SQL to Yes.
  2. For CAS model:
    1. Follow the step 1.a to obtain the SRCHATTR_ID.
    2. Determine if LISTAGG is enabled or disabled.
      • If LISTAGG is enabled, extract the DatabaseCASCategoryStage1b-listagg.sql file.
      • If LISTAGG is disabled, extract the DatabaseCASCategoryStage1b.sql file.
      • In either case, add SRCHATTR_ID in the SQL query section where SA.SRCHATTR_ID is being compared to F.SRCHATTR_ID. For example,
        WHERE SA.SRCHATTR_ID = F.SRCHATTR_ID AND SA.SRCHATTR_ID IN (-1002, -1013, -1101, -1016)
    3. Follow step 1.d to Find Facets SQL or Find Facets SQL - LISTAGG processor in the following components:
      • auth.reindex.cas - Category Stage 1b (Find Facets)
      • auth.category.cas - Category Stage 1b (Find Facets)
      • auth.dataload.cas - Category Stage 1b (Find Facets)