(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 WebSphere Commerce Accelerator. For this reason, edit the contract XML when we want to change the name of the assigned catalog filter. We can use this procedure to assign catalog filter to other types of contracts if you do not want to use WebSphere 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 beginning

To learn more about assigning catalog filters to contracts for different business models, read Catalog filter assignment and contracts.Query the WebSphere Commerce database to obtain the following values for the price rule and contract:


Procedure

  1. To export the contract to which we want to assign the price rule, issue the following URL using the storeId and contractId:

    ContractExport URL

  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 we want to assign.

    • If we 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 we want to assign, for example, 10001.

  5. Search for the following string: minorVersionNumber

  6. Increase the value of minorVersionNumber by 1.

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

  7. Save and close the contract XML.

  8. Import the contract to WebSphere Commerce by issuing the following URL:

    ContractImportApprovedVersion 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.