HCL Commerce Enterprise

Changing the default contract

To modify the default contract without using the user interface, you need to export the default contract and make changes to the contract XML file and then import the modified contract.


  1. Type the following SQL to retrieve the contract_id and store_id.
    select contract_id, store_id from storedef where store_id 
    = (select storeent_id from storeent where identifier =
  2. Export the default contract as an XML file.

    Use the contract_id that was retrieved from step 1 to export ConsumerDirectDefaultContract.xml file in the workspace_dir\WC\xml\trading\xml directory

    HCL Commerce ProfessionalThe ContractExport command is not registered in the struts-config.xml.

    1. Add the following content to the struts-config-ext.xml file (for HCL Commerce Version 9.0.0.x) or struts-wcs-stores-custom.xml (for Version before the </action-mappings> tag:
      For Version 9.0.0.x:
               <set-property property="authenticate"
               <set-property property="https" value="0:1"/> 
      HCL Commerce Version or later
      <param name="parameter">com.ibm.comerce.contract.commands.ContractExportCmd</param>
      <param name="authenticate">0:0</param>
      <param name="https">0:1</param>
    2. Either refresh the Struts Configuration Registry in Administration Console or restart the server.
  3. Modify the default contract to include Payment method.
    1. Edit the file ConsumerDirectDefaultContract.xml. At the end of the </BuyerContract> tag, add the Payment TC.
       <!-- Payment TC --> 
      <PaymentTC mandatory = "false" changeable = "false" >
      <PaymentPolicyRef policyName = "PayLater">
      <StoreRef name = "ConsumerDirect">
      <OrganizationRef distinguishName = "ou=b2c,o=seller
      organization,o=root organization"/>
      <PaymentMethodDisplayString name = "Pay Later"/>
    2. Run the SQL to get the policyName.
      select policyname from policy where policy_id=?;
    3. Run the SQL to get the StoreRef.
      select identifier from storeent where store_id=?;
    4. Run the SQL to get the distinguishName.
      select dn from orgentity where orgentity_id in (select member_id
      from storeent where storeent_id=storeent_id); 

    The PaymentMethodDisplayString is the payment method display name when you select the Payment method in the order flow.

    The properties column of the policy table for Payment policy is similar to this,
    You will find the StandardVisa.jsp (the property attrPageName value) in the store\ShoppingArea\CheckoutSection\StandardCheckoutSubsection directory. If you do not find then you need to copy it to this location.
  4. In the file ConsumerDirectDefaultContract.xml file, modify the minorVersionNumber by increasing it by one l.
    <ContractUniqueKey name = "ConsumerDirect Default Contract" 
    majorVersionNumber = "1" minorVersionNumber = "1" origin =
    <OrganizationRef distinguishName = "o=seller organization,o=root
  5. Import the default contract. Using the utility from step 2, import an Active Contract using the file ConsumerDirectDefaultContract.xml, and the target store is the store_id from step 1.
  6. To verify if the new payment method is created, create an order in the Order Summary page. You will find the payment method as follows:

    Screen capture showing the new payment method