close

Filter

loading table of contents...

Connector for HCL Commerce Manual / Version 2101

Table Of Contents

7.1 Configuring the Commerce Adapter

Configuring the Commerce Adapter

The physical connection to the HCL Commerce Server system is configured in the Commerce Adapter. The Commerce Adapter itself communicates via REST API calls with the HCL Commerce Server system.

The Commerce Adapter comes along with a set of configuration properties. Most of them have defaults and need no further customization.

For basic configuration you should set the following properties:

  • wcs.url

  • wcs.secure-url

  • wcs.search-url

  • wcs.secure-search-url

  • wcs.username

  • wcs.password

  • wcs.trust-all-ssl-certificates

To build storefront links you should set the following properties:

  • wcs.link.storefront-host

  • wcs.link.storefront-url

  • wcs.link.storefront-url-for

  • wcs.link.asset-url

  • wcs.link.asset-url-for

Since version 1.4.0, the commerce-adapter-wcs supports HCL Commerce 9.1. There is an additional property livecontext.ibm.wcs.search.profile.prefix which uses to override the prefix of the HCL Commerce Search profile. For the version HCL Commerce 9.0 and older the prefix CoreMedia was used as the default search profile prefix. With HCL Commerce 9.1 the prefix HCL should be used as search profile prefix.

Since only the headless scenario is supported with HCL Commerce 9.1, no links are built by the Commerce Adapter. In this respect, the link properties are not required in version 9.1.

Since version 1.3.14, the commerce-adapter-wcs provides Spring profiles for the different HCL Commerce Server versions that are supported. These profiles configure the suitable URLs that are required to connect to the HCL Commerce Server. To use these profiles, set the wcs.host property and activate the Spring profile wcs-[VERSION] when starting the adapter application.

For more details and the full set of configuration properties see Chapter 14, Commerce Adapter Properties.

Starting the Commerce Adapter

This guide describes how to build and run the commerce-adapter-wcs Docker container.

Prerequisites to be installed:

  • Maven

  • Docker

  • Docker Compose (optional)

CoreMedia provides a Docker setup for the HCL Commerce Connector. It is part of a dedicated CoreMedia HCL Commerce Connector Contributions Repository.

After cloning the workspace, a coremedia/commerce-adapter-wcs Docker image can be build via mvn clean install command.

To run the commerce-adapter-wcs Docker container, the configuration properties for the adapter must be set (see above). Spring Boot offers several ways to set the configuration properties, see Spring Boot Reference Guide - 24. Externalized Configuration. When starting the Docker container, this will probably lead to setting either environment variables (using the Docker option --env or --env-file) or mounting a configuration file (using the Docker option --volume).

The Docker container can be started with the command

docker run \
  --detach \
  --rm \
  --name commerce-adapter-wcs \
  --publish 44365:6565 \
  --publish 44381:8081 \
  [--env ...|--env-file ...|--volume] \
  coremedia/commerce-adapter-wcs:${ADAPTER_VERSION}

To run the commerce-adapter-wcs Docker container with the CoreMedia CMCC Docker environment, add the commerce-adapter-wcs.yml compose file that is provided with the CoreMedia Blueprint Workspace to the COMPOSE_FILE variable in the Docker Compose .env file. Ensure that the environment variables that are passed to the Docker container are also defined in the .env file:

COMPOSE_FILE=compose/default.yml:compose/commerce-adapter-wcs.yml
WCS_HOST=...
...

The commerce-adapter-wcs container is started with the CoreMedia CMCC Docker environment when running

docker-compose up --detach

Detailed information about how to set up the CoreMedia CMCC Docker environment can be found in Chapter 3, Docker Setup in Deployment Manual.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.