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.
Procedure
-
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 = 'ConsumerDirect');
-
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
-
Modify the default contract to include Payment method.
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 propertyattrPageName=StandardVisa&paymentConfigurationId=default&display=false&compatibleMode=false
attrPageName
value) in the store\ShoppingArea\CheckoutSection\StandardCheckoutSubsection directory. If you do not find then you need to copy it to this location. -
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 = "Manual"> <ContractOwner> <OrganizationRef distinguishName = "o=seller organization,o=root organization"/> </ContractOwner> </ContractUniqueKey>
- 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.
-
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: