close

Filter

loading table of contents...

Connector for HCL Commerce Manual / Version 2010

Table Of Contents

4.10 Deploying the CoreMedia Widgets

The CoreMedia widgets are HCL Commerce Composer Widgets. You can use the CoreMedia Content Widget to add CoreMedia content fragments to your HCL Commerce pages and the CoreMedia Asset Widget to add product images to product detail pages.

Prerequisites

In order to use the CoreMedia widgets to embed CoreMedia fragments, the Fragment Connector needs to be deployed before executing these steps.

Register the Widget definition and subscribe your Store to it

See the HCL documentation at https://help.hcltechsw.com/commerce/9.0.0/data/concepts/cmlbatchoverview.html: for more details about data load.

  1. Stop the HCL Commerce server in the HCL RAD environment.

  2. Adapt the database settings in the Data Load environment configuration file (SAMPLEDATA-ZIP\workspace\DataLoad\dataload\common\wc-dataload-env.xml) from the CoreMedia LiveContext 3 WebSphere Commerce Project Sample Data Zip file to the settings of your WebSphere database.

    You can retrieve your database settings from the HCL RAD environment configuration file WC/xml/config/wc-server.xml, at the following XML element:

    <InstanceProperties>
       <Database>
         <DB>

    For a DB2 database, the attribute schema in wc-dataload-env.xml corresponds to the attribute DBNode in wc-server-xml.

    Find your store identifier in the HCL Management Center in Store Management. If you use the default HCL shop, the value is "Aurora".

  3. Use the Data Load business object configuration files from the Sample Data for HCL Commerce ZIP file for registering the widget definition (workspace\DataLoad\dataload\common\[store_name]\Widget\wc-loader-registerWidgetdef.xml) and for subscribing the widget definition (workspace\DataLoad\dataload\common\[store_name]\Widget\wc-loader-subscribeWidgetdef.xml) where store_name is the store identifier of your store ("AuroraESite", for instance).

  4. Use the CSV input files from the CoreMedia LiveContext 3 WebSphere Commerce Project Sample Data ZIP file for registering the widget definition (workspace\DataLoad\dataload\common\[store_name]\Widget\registerWidgetdef.csv) and for subscribing the widget definition (workspace\DataLoad\dataload\common\[store_name]\Widget\subscribeWidgetdef.csv).

  5. Configure the Data Load order configuration file (wc-dataload.xml). The Data Load file has pointers to the environment settings file, the business object configuration file and the input file.

    <?xml version="1.0" encoding="UTF-8"?>
    
    <_config:DataLoadConfiguration
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation=
          "http://www.ibm.com/xmlns/prod/commerce/foundation/config
            ../../../../xml/config/xsd/wc-dataload.xsd"
        xmlns:_config=
          "http://www.ibm.com/xmlns/prod/commerce/foundation/config">
    
      <_config:DataLoadEnvironment configFile="wc-dataload-env.xml"/>
    
      <_config:LoadOrder commitCount="100"
                         batchSize="1"
                         dataLoadMode="Replace">
        <_config:property name="firstTwoLinesAreHeader" value="true"/>
        <_config:property name="loadSEO" value="true"/>
    
        <!-- Configuration for the file to register a widget -->
        <_config:LoadItem
            name="RegisterWidgetDef"
            businessObjectConfigFile=
              "wc-loader-registerWidgetdef.xml">
          <_config:DataSourceLocation
              location="registerWidgetdef.csv"/>
        </_config:LoadItem>
    
        <!-- Configuration for the file to subscribe a store to a widget -->
        <_config:LoadItem
            name="SubscribeWidgetDef"
            businessObjectConfigFile=
              "wc-loader-subscribeWidgetdef.xml">
          <_config:DataSourceLocation
              location="subscribeWidgetdef.csv"/>
        </_config:LoadItem>
      </_config:LoadOrder>
    
    </_config:DataLoadConfiguration>
    

    Example 4.3. wc-dataload.xml


  6. Run the Data Load utility command syntax with the dataload.bat tool which is located in workspace\bin of the RAD environment. Give the absolute path to the wc-dataload.xml file. The call might look as follows:

    ..\bin\dataload.bat [path_to_your_dataload]\wc-dataload.xml
Load the custom access control policies for the CoreMedia Widget
  1. Stop the HCL Commerce server in the HCL RAD environment.

  2. Copy the custom access control policies file workspace/DataLoad/acp/common/CoreMediaContentDisplay.xml to the access control policies directory which is located in xml\policies\xml of the RAD environment.

  3. Run the ACP Load utility with the acpload.bat tool which is located in workspace\bin of the RAD environment. Give the absolute path to the acp-filename.xml file. The call might look as follows:

    ..\bin\acpload.bat [path_to_your_acp_dir]\acp-filename.xml

    The ACP Load documentation can be found here: https://help.hcltechsw.com/commerce/9.0.0/admin/refs/raxacpload.html.

    Note

    Note

    The acpload tool itself does not report any problems. So, check if the tool created two new XML files with the suffixes _xmltrans.xml and _idres.xml in ..\xml\policies\xml for each policy file. Also, look into ..\logs\acpload.log and ..\logs\messages.txt for errors.

Add the Widget UI to the Management Center app
  1. Copy and merge the LOBTools folder content into the LOBTools folder of the HCL RAD workspace.

Copy the crs-web Folder and Apply JSP Customizations

Copy and merge the content of the crs-web/ folder of the HCL Commerce Workspace archive into the HCL RAD workspace folder crs-web/ as described in Section 3.10, “Customizing HCL Commerce JSPs”

Using Placeholder Resolution for Asset URLs

If you have licensed CoreMedia Advanced Asset Management you can use placeholders for the CMS host and the store ID in your image URLs. Section 6.6.4.2, “Placeholder Resolution for Asset URLs” in Blueprint Developer Manual describes further details and how you enable placeholder resolution.

Refresh and Rebuild the workspace in Eclipse (RAD)

Now you have to refresh and rebuild the HCL workspace in the HCL RAD environment.

  1. Refresh the projects in the HCL RAD system so that the new files are recognized:

    1. Select the crs-web project and press F5

    2. Select the WebSphereCommerceServerExtensionsLogic project and press F5

    3. Select the LOBTools project and press F5

  2. Rebuild the LOBTools:

    1. Rebuild the LOBTools in order to apply the changes to the management Center application.

    This steps might take some time.

  3. Republish the HCL Commerce server workspace in order to apply the changes to the shop web application. In the server view (bottom left corner) right click on the server instance and select Publish from the context menu.

You have updated the Management Center tools and the development workspace and the HCL Commerce server has been restarted.

Search Results

Table Of Contents