Enabling and disabling the doPrice parameter for order commands

To enable and disable the doPrice parameter for the IBM Sales Center, to invoke related order commands such as OrderItemAdd, OrderItemUpdate, and OrderCalculate. Setting the doPrice parameter to N turns off price calculation for order items. Setting the doPrice parameter to Y turns on price calculation for order items. By default, doPrice is set to Y.

About this task

To enable the doPrice parameter for order commands in the IBM Sales Center:

Procedure

  1. Open the SyncSalesOrderBODMapping.xml file found in the WC_eardir \xml\messaging\ directory.
  2. To enable the doPrice parameter:
    1. Add a Constant element into the body of the QuoteItemAddCmd command element as follows:
      
      <Command
      CommandName="com.ibm.commerce.order.commands.OrderItemAddCmd" 
            Condition='action="Add" AND commerceObject="OrderItem"'>
         <Constant Field="doPrice">Y</Constant>
      </Command>
      
    2. Make the same update to the Command element of the OrderItemUpdateCmd:
      
      <Command
      CommandName="com.ibm.commerce.order.commands.OrderItemUpdateCmd" 
            TemplateTagName="SyncSalesOrderUpdateItem81" 
            Condition='action="Change" AND
      commerceObject="OrderItem"'>
         <Constant Field="doPrice">Y</Constant>
      </Command>
      
    3. Make the same update to the Command element of the OrderCalculateCmd:
      
      <Command
      CommandName="com.ibm.commerce.order.commands.OrderCalculateCmd"
            Condition='action="Calculate" AND commerceObject="Order"'>
         <Constant Field="doPrice">Y</Constant>
      </Command>
      
  3. To disable the doPrice parameter:
    1. Update the <Constant Field="doPrice"> element in the OrderItemAddCmd element by entering an "N" into the body of the element:
      
      <Command
      CommandName="com.ibm.commerce.order.commands.OrderItemAddCmd" 
            Condition='action="Add" AND commerceObject="OrderItem"'>
         <Constant Field="doPrice">N</Constant>
      </Command>
      
    2. Make the same update to the Command element of the OrderItemUpdateCmd:
      
      <Command
      CommandName="com.ibm.commerce.order.commands.OrderItemUpdateCmd" 
            TemplateTagName="SyncSalesOrderUpdateItem81" 
            Condition='action="Change" AND
      commerceObject="OrderItem"'>
         <Constant Field="doPrice">N</Constant>
      </Command>
      
    3. Make the same update to the Command element of the OrderCalculateCmd:
      
      <Command
      CommandName="com.ibm.commerce.order.commands.OrderCalculateCmd"
            Condition='action="Calculate" AND commerceObject="Order"'>
         <Constant Field="doPrice">N</Constant>
      </Command>
      
  4. Restart the WebSphere Commerce instance.