Enabling the AND operation for multiple contracts

You can enable the AND operation for multiple contracts so that shoppers must be entitled to products under all contracts before they can purchase them. The default value is OR, where shoppers can purchase products if they are entitled to them under only one contract.

Before you begin

To change any properties in the contract component configuration file (wc-component.xml), you must create a customized version of the file in a new folder. The customized version of the file must contain only the changed properties.

Procedure

  1. Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
  2. Create a custom contract component configuration file (wc-component.xml), if one does not exist:
    1. Go to the following directory WCDE_installdir\workspace\WC\xml\config\
    2. In the config folder, create a new com.ibm.commerce.contract-ext folder so the path looks like this:

      WCDE_installdir\workspace\WC\xml\config\com.ibm.commerce.contract-ext\

    3. Create an empty wc-component.xml file in the com.ibm.commerce.contract-ext folder. This file is your custom wc-component.xml file.
  3. Add the basic XML elements that are required for your custom wc-component.xml file:
    1. Open your empty custom wc-component.xml file in an XML editor.
    2. Copy the following code snippet into the file:
      <_config:DevelopmentComponentConfiguration
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config"
      xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config ../xsd/wc-component.xsd ">
      
      
      <_config:extendedconfiguration>
      <_config:configgrouping name="MultipleContracts">
      <_config:property name="operation" value="AND"/>
      </_config:configgrouping>
      </_config:extendedconfiguration> 
      
      </_config:DevelopmentComponentConfiguration>
  4. Save and close the custom configuration file.
  5. Test your configuration changes.
  6. Deploy the customized file to the production environment.