HCL Commerce Enterprise

Assigning a catalog filter by modifying the contract XML

The storefront asset store base for default contract of a B2C store is not viewable in HCL Commerce Accelerator. For this reason, you must edit the contract XML when you want to change the name of the assigned catalog filter. You can use this procedure to assign catalog filter to other types of contracts if you do not want to use HCL Commerce Accelerator.

You might need a site administrator to assist you with this task because it involves querying database tables and editing XML files.

Before you begin

To learn more about assigning catalog filters to contracts for different business models, read Catalog filter assignment and contracts.
Query the HCL Commerce database to obtain the following values for the price rule and contract:
catalogFilterId
The ID for the catalog filter you want to assign. The catalog filter must belong to either the store that the contract belongs to or the related storefront asset store (for an extended site)
To find the catalogFilterId, run the following SQL statement:
select * from catfilter;
storeId
The ID for the store to which the contract belongs.
To find the storeId, run the following SQL statement:
select * from storeent;
contractId
The ID for the contract you want to export.
To find the contractId, run the following SQL statement:
select * from contract;

Procedure

  1. To export the contract to which you want to assign the price rule, issue the following URL using the storeId and contractId:
  2. Open the exported contract XML in an editor.
  3. To determine whether the contract already has a catalog filter assigned, search for lines of code similar to the following example:
    <TermCondition type = "CatalogFilterTC" mandatory = "false" changeable = "false" >
            <Property name = "catalogFilterId"  value = "catalogFilterId_value" />
        </TermCondition>
  4. Complete one of these steps, whichever one applies:
    • If you found the lines of code in step 3, update the catalogFilterId_value to the catalogFilterId of the catalog filter you want to assign.
    • If you did not find the lines of code in step 3:
      • Locate the </BuyerContract> element.
      • Above the </BuyerContract> element, copy the three lines of code from step 3.
      • Replace catalogFilterId_value with the catalogFilterId of the catalog filter you want to assign, for example, 10001.
  5. Search for the following string: minorVersionNumber
  6. Increase the value of minorVersionNumber by 1.

    You can only assign one catalog filter to the same contract.

  7. Save and close the contract XML.
  8. Import the contract to HCL Commerce by issuing the following URL:

Results

The catalog filter is now assigned to the contract. The customer entitled to the contract can not browse and buy the products filtered by this catalog filter.