Connector for HCL Commerce Manual / Version 2010
Table Of ContentsThe 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/8.0.0/data/concepts/cmlbatchoverview.html: for more details about data load.
Stop the HCL Commerce server in the HCL RAD environment.
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
inwc-dataload-env.xml
corresponds to the attributeDBNode
inwc-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".
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
) wherestore_name
is the store identifier of your store ("AuroraESite", for instance).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
).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 3.7. wc-dataload.xml
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 thewc-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
Stop the HCL Commerce server in the HCL RAD environment.
Copy the custom access control policies file
workspace/DataLoad/acp/common/CoreMediaContentDisplay.xml
to the access control policies directory which is located inxml\policies\xml
of the RAD environment.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 theacp-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/8.0.0/admin/refs/raxacpload.html.
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
Copy and merge the
LOBTools
folder content into theLOBTools
folder of the HCL RAD workspace.
Copy the Stores Folder and Apply JSP Customizations
Copy and merge the content of the Stores/
folder of the
HCL Commerce Workspace archive into the HCL RAD workspace folder Stores/
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.
Refresh the projects in the HCL RAD system so that the new files are recognized:
Select the
Stores
project and press F5Select the
WebSphereCommerceServerExtensionsLogic
project and press F5Select the
LOBTools
project and press F5
Rebuild the
LOBTools
:Rebuild the
LOBTools
in order to apply the changes to the management Center application.
This steps might take some time.
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
from the context menu.
You have updated the Management Center tools and the development workspace and the HCL Commerce server has been restarted.