Tutorial: Customizing Web 2.0 and Web services to support customization of the OrderItem noun using the UserData field > < Previous | Next >

 

Updating the order shopping flow to include your customized code

This section refers to updating the order shopping flow to include the customized code.. Register the your new commands

  1. Open a browser and type the following URL: http://localhost/webapp/wcs/admin/servlet/db.jsp.

  2. In the input box, enter the following SQL statement to register the new commands
    INSERT INTO CMDREG(STOREENT_ID, INTERFACENAME, CLASSNAME, TARGET)
    VALUES
    (0,'com.ibm.commerce.orderitems.commands.ExtendOrderItemProcessCmd',
    'com.mycompany.commerce.customization.order.MyExtendOrderItemProcessCmdImpl','Local');
    
    UPDATE CMDREG SET CLASSNAME =
    'com.mycompany.commerce.customization.order.ExtComposeOrderDetailsCmdImpl'
    WHERE
    INTERFACENAME='com.ibm.commerce.order.facade.server.commands.ComposeOrderCmd+IBM_Details';
    

Register the your new Client API

  1. In WebSphere Commerce Developer, open the Project Explorer perspective, and expand Dynamic Web Projects\Stores\WebContent\WEB-INF.

  2. Open struts-config-ext.xml

  3. Copy the following text into the bottom of the file, but above the <struts-config> tag
    <plug-in className="com.ibm.commerce.struts.ComponentPlugIn">
            <set-property property="componentId" value="order"/>
            <set-property property="clientFacadeClassName"
    value="com.mycompany.commerce.customization.order.MyOrderFacadeClient"/>
    </plug-in>
    

  4. Save and close the file.

< Previous | Next >