Tutorials > Sales Center > Extend a page in an editor

< Previous | Next >


Deploy the changes

This section refers to deploying the changes.

Deploy the changes involves the following high-level steps:


Procedure

  1. Export the code for the client from the IBM Sales Center development environment.

  2. Export the code for the WebSphere Commerce Server from the WebSphere Commerce development environment.

  3. Install the client code on an IBM Sales Center client.

  4. Install the WebSphere Commerce Server code on a target server.

Return to the client development environment and package the customized assets for deployment...

  1. Open the IBM Sales Center development environment if it is not already open.

  2. In the Package Explorer view, navigate to the orderEditorExtension project.

  3. In the orderEditorExtension project, locate the plugin.xml file. Double-click the file to open it for editing.

  4. Click the Build tab.

  5. In the Binary Build section of the Build Configuration editor:

    1. Select the config directory to include the config/config.ini file in the exported plug-in.

    2. Select the ExtendedHelpContents.xml file.

    3. Keep all default selections.

    Your Binary Build list should be similar to the following screen capture:

  6. Save the changes.


Create a feature project

  1. Click File > New > Feature Project.

  2. In the Project name field, enter giftMessageFeature.

  3. Click Next.

  4. In the Feature Properties window, in the Feature Provider field, enter MyCompany.

  5. Click Next.

  6. From the Referenced Plug-ins and Fragments list, select the orderEditorExtension.

  7. Click Finish. The feature.xml file opens for editing in the Feature Manifest editor.

  8. In the Feature URLs pane, right-click Update URLs and select New > Update URL as in the following screen capture:

  9. Click the Properties view:

    1. Set the Label property's value to Gift Message feature.

    2. Set the URL property's value to http://giftMessageURL. If we will host this update on a real update site, set this value to the server URL from which the updates can be found.

  10. Save the changes.


Create an update site project

  1. Click File > New > Other.

  2. Select Plug-in Development > Update Site Project.

  3. Click Next.

  4. In the Project name field, enter giftMessageUpdateSite and click Finish.

  5. In the site.xml editor, in the Features tab, click Add.

  6. From the Available Features list select giftMessageFeature (1.0.0) and click Finish.

  7. Select giftMessageFeature (1.0.0) and from its pop-up menu, select Publish as in the following screen capture:

  8. Click Build All.

  9. Save the changes.

  10. In the Package Explorer, hold down the Ctrl key and select both the giftMessageFeature project and the giftMessageUpdateSite project. Right-click and select Export.

  11. Select File System and click Next.

  12. In the To directory field, enter a directory on the file system, for example drive :/giftMessageExtension.

  13. Click Finish.


Export the code for the WebSphere Commerce Server from the WebSphere Commerce development environment

The following steps assume that you already deployed the gift message tutorial code when performing the gift message tutorial, including the WebSphereCommerceServerExtensionsLogic.jar file. The following steps describe steps to add new classes to the WebSphereCommerceServerExtensionsLogic.jar file on the target system so that the previous customizations are not overwritten.

  1. Open WebSphere Commerce Developer if it is not already open.

  2. In the Java EE perspective, in the Enterprise Explorer view, navigate to Other Projects > WebSphereCommerceServerExtensionsLogic.

  3. From the WebSphereCommerceServerExtensionsLogic project's pop-up menu, select Export.

  4. Select File system and click Next.

  5. In the File System window:

    1. Click Deselect All.

    2. Under the WebSphereCommerceServerExtensionsLogic project, under the bin folder, navigate to com/ibm/commerce/sample/messaging/bodreply.

    3. Select the bodreply folder to select the ExtendedConfirmSalesOrder.class file and the ExtendedShowSalesOrder.class file.

    4. Under the WebSphereCommerceServerExtensionsLogic project, under the bin folder, navigate to com/ibm/commerce/sample/databeans.

    5. Select the databeans folder to select the OrderGiftDataBean.class file.

    6. In the To directory field enter a temporary directory for the exported code, for example, drive:/exportTemp/

    7. Click Next.

  6. Click Finish.

  7. Copy the customized Telesales Registry file to the temporary directory.

    1. Navigate to WC_EAR/xml/messaging

    2. Copy the TelesalesRegistry-ext.xml file to drive:/exportTemp/

  8. Prepare the files for deployment. The files you deploy must be in the same file structure as under the EAR directory.

    1. Create the following file structure in the drive:/exportTemp directory. Note that in this case, WebSphereCommerceServerExtensionsLogic.jar is a directory:

      • WebSphereCommerceServerExtensionsLogic.jar/com/ibm/commerce/sample/messaging/bodreply/ExtendedConfirmSalesOrder.class

      • WebSphereCommerceServerExtensionsLogic.jar/com/ibm/commerce/sample/messaging/bodreply/ExtendedShowSalesOrder.class

      • WebSphereCommerceServerExtensionsLogic.jar/com/ibm/commerce/sample/databeans/OrderGiftDataBean.class

      • xml/messaging/TelesalesRegistry-ext.xml

    2. Use a ZIP compression utility to create a ZIP file of the three files listed above. Name the ZIP file drive:/exportTemp/ giftorder.zip. Ensure you maintain the file structure noted in the previous step. This file structure is necessary so that the two .class files will be merged into the existing WebSphereCommerceServerExtensionsLogic.jar file on the target system. Using this method, we will not overwrite and lose the previous customizations you made in the WebSphereCommerceServerExtensionsLogic.jar file.


Update the WebSphere Commerce application

The following steps assume you run the WebSphere Application Server administration console on the development machine on which you exported the files to drive:/exportTemp/.


Stop your target WebSphere Commerce application

Open the WebSphere Application Server administration console and stop the WebSphere Commerce application:

  1. Open the WebSphere Application Server administrative console by entering the following URL in a Web browser: http:// host: portNumber/ibm/console , where host is the name of the target machine and portNumber is the port number used to access the Admin Console is defined during profile creation. The default port number is 9060.

  2. Click Applications > Enterprise Applications to see a list of installed applications.

  3. Select the WebSphere Commerce application, for example WC_demo, and click Stop.


Export a backup copy the EAR

Export a backup copy of the EAR, so that you can revert to the old version in the future if necessary:

  1. In the WebSphere Application Server administrative console, click Applications > Enterprise Applications to see a list of installed applications.

  2. Select the WebSphere Commerce application, for example WC_demo, and click Export.

  3. Follow the wizard and save the EAR file in a backup directory.


Update the command JAR file on the target WebSphere Commerce Server

In this section we will update the target WebSphere Commerce Server to use the new command JAR file,...

  1. In the WebSphere Application Server administrative console, select your application name, for example WC_demo, and click Update.

  2. Select Partial application.

  3. Select Local file system and specify the path to drive:\exportTemp\giftorder.zip.

  4. Click Next.

  5. Click OK.

  6. When the update completes successfully, click Save to Master Configuration.

  7. On the Enterprise Applications screen, click Save to save your changes to the master configuration.


Update the WebSphere Commerce configuration file

In WebSphere Commerce Developer, you made changes to the wc-server.xml file. You must make the same changes on the target machine in the WebSphere Commerce configuration file.

To update the WebSphere Commerce configuration file on the target server:

  1. Open the WebSphere Commerce configuration file in a text editor.

  2. Locate the following text:

    <property
            baseRegistryFileName="TelesalesRegistry.xml"
            baseRegistryFilePath="messaging"
            customRegistryFileName=""
            customRegistryPath=""
            display="false" enableBaseRegistryOverride="false" />
    

  3. Modify the preceeding text to include the new registry file and set enableBaseRegistryOverride property to true. Your text should match the following:

    <property
            baseRegistryFileName="TelesalesRegistry.xml"
            baseRegistryFilePath="messaging"
            customRegistryFileName="TelesalesRegistry-ext.xml"
            customRegistryPath="messaging"
            display="false" enableBaseRegistryOverride="true" />
    

  4. Save the changes.

  5. On the file system, navigate to WC_INSTALL /bin

  6. Run the following ANT task: WC_INSTALL /bin/config_ant -DinstanceName= instance UpdateEAR where instance is the name of the instance.


Start the target WebSphere Commerce application

Open the WebSphere Application Server administration console and stop the WebSphere Commerce application:

  1. In the WebSphere Application Server administrative console click Applications > Enterprise Applications to see a list of installed applications.

  2. Select the WebSphere Commerce application, for example WC_demo, and click Start.


Update the IBM Sales Center client

To apply the new search option code to the IBM Sales Center client:

  1. If the IBM Sales Center client is on a different machine than the directory to which you exported the orderEditorExtension, copy the norderEditorExtension directory to the machine that runs the IBM Sales Center client.

  2. Open the IBM Sales Center.

  3. From the Application menu, select Install. If you do not see the Install option, then open the Sales Center in administrator mode.

  4. In the Application Installations window, click Add Folder Location.

  5. Navigate to the folder that contains the orderEditorExtension, for example drive :/giftMessageExtension/giftMessageUpdateSite.

  6. From the Location List, select only giftMessageExtension/giftMessageUpdateSite.

  7. If the Edit Locale window displays, click OK.

  8. In the Search Results window, select giftMessageFeature.

  9. Click Next.

  10. Select I accept the terms in the license agreements and click Next.

  11. Accept the default value and click Finish.

  12. Click Install.

  13. When prompted, restart the IBM Sales Center client.

  14. When the client restarts, select Application > Open > Sales Center - Order Management.

  15. Click File > Logon and connect to the WebSphere Commerce Server.

  16. Test the orderEditorExtension as described in Test the changes.

  17. Verify the gift message values are sent from the server to the IBM Sales Center client by closing the order you submitted and opening it again. Observe that the gift message values are loaded on the Payment page.

< Previous | Next >


+

Search Tips   |   Advanced Search