Connector for HCL Commerce Manual / Version 2010
Table Of Contents
The information on how to connect to the HCL Commerce system is configured in the filesystem
of the web applications that use the eCommerce API. These web applications are at least the
Studio web application (workspace module studio-webapp
) and the CAE
applications for delivery (workspace modules cae-preview-webapp
and
cae-live-webapp
).
The application.properties
file below the WEB-INF
directory of your web application contains the HCL Commerce related configuration
properties. Example 5.1, “HCL Commerce configuration in application.properties” shows the relevant parts of the file. The
meaning of the values will be explained in the table below.
############################################################################### # CoreMedia LiveContext Configuration ############################################################################### livecontext.ibm.wcs.url = http://wcs-server.yourdomain.com livecontext.ibm.wcs.secureUrl = https://wcs-server.yourdomain.com livecontext.ibm.wcs.rest.url = ${livecontext.ibm.wcs.url}/wcs/resources/store livecontext.ibm.wcs.rest.secureUrl = ${livecontext.ibm.wcs.secureUrl}/wcs/resources/store livecontext.ibm.wcs.store.url = ${livecontext.ibm.wcs.url}/wcsstore/Aurora livecontext.service.credentials.username = <wcs_username> livecontext.service.credentials.password = <wcs_password> livecontext.managementtool.web.url = ${livecontext.ibm.wcs.secureUrl}/lobtools/cmc/ManagementCenterMain livecontext.apache.wcs.host = shop-preview-production-helios.yourdomain.com livecontext.apache.live.production.wcs.host = shop-helios.yourdomain.com livecontext.apache.preview.production.wcs.host = shop-preview-production-helios.yourdomain.com livecontext.apache.preview.wcs.host = shop-preview-helios.yourdomain.com livecontext.cookie.domain = .yourdomain.com
Example 5.1. HCL Commerce configuration in application.properties
livecontext.ibm.wcs.url
| |
Description | The general WCS URL |
Example | http://wcs-server.yourdomain.com |
livecontext.ibm.wcs.secureUrl
| |
Description | The secure WCS URL |
Example | https://wcs-server.yourdomain.com |
livecontext.ibm.wcs.rest.url
| |
Description | How to reach the WCS REST API via HTTP |
Example | ${livecontext.ibm.wcs.url}/wcs/resources/store |
livecontext.ibm.wcs.rest.secureUrl
| |
Description | How to reach the WCS REST API via HTTPS |
Example | ${livecontext.ibm.wcs.secureUrl}/wcs/resources/store |
livecontext.ibm.wcs.store.url
| |
Description | Another WCS URL to get shop resources |
Example | ${livecontext.ibm.wcs.url}/wcsstore/Aurora |
livecontext.service.credentials.username
| |
Description | The service user used to login into WCS |
Example | cmsadmin |
livecontext.service.credentials.password
| |
Description | Password of the service user |
Example | changeme |
livecontext.cookie.domain
| |
Description | The customer's domain. |
Example | |
livecontext.managementtool.web.url
| |
Description | The web URL of the eCommerce system's management tool |
Example | ${livecontext.ibm.wcs.secureUrl}/lobtools/cmc/ManagementCenterMain |
Table 5.1. Properties for WCS connection
The exact store configuration depends on your store configuration in your HCL Commerce environment. The store specific properties that logically define a shop instance can also be part of the Spring configuration. The following listing gives an example.
<util:map id="myStoreConfig"> <entry key="store.id" value="${my.wcs.store.id}"/> <entry key="store.name" value="${my.wcs.store.name}"/> <entry key="catalog.id" value="${my.wcs.catalog.id}"/> <entry key="currency" value="${my.wcs.store.currency}"/> <entry key="dynamicPricing.enabled" value="${my.wcs.store.dynamicPricing.enabled}"/> </util:map> <customize:append id="ibmStoreConfigurationsCustomizer" bean="ibmStoreConfigurations"> <map> <entry key="myStore" value-ref="myStoreConfig"/> </map> </customize:append>
The example makes use of Spring placeholder tokens that are mapped in the properties file
mentioned above. It also shows how to add the custom store configuration to the existing
ibmStoreConfigurations
map. Later this store configuration (myStore
)
can be referenced from the site configuration settings within the content. Individual values can
be overwritten in the content again.
Alternatively to a catalog.id
it is also possible to use the catalog name within a
catalog.name
property instead. It will be mapped to the current
catalog.id
at runtime. When the catalog ID is not given in configuration, then the ID
from the default catalog will be automatically used.
The same function is also available for the store ID. In case a store ID is not given it can
also be retrieved from the HCL Commerce but a given config value for store.id
takes precedence.