close

Filter

loading table of contents...

Connector for HCL Commerce Manual / Version 2307

Table Of Contents

5.2 Shop Configuration in Content Settings

The store specific properties that logically define a shop instance are part of the content settings. They configure the Commerce Adapter endpoint, which storeId should be used, which catalog, the currency and other shop related settings.

Refer to the Javadoc of the class com.coremedia.blueprint.base.livecontext.client.settings.CommerceSettings for further details.

Each site can have one single shop configuration (see the Blueprint site concept to learn what a site is). That means only shop items from exactly that shop instance (with a particular view to the product catalog) can be interwoven to the content elements of that site. In the example settings there is a LiveContext settings content item linked with the root channel. This is the perfect place to make these settings.g

The following store specific settings can be configured below the struct property named commerce:

Name Type Description Example Required
endpoint String Property Host and Port of the Commerce Adapter. wcs-commerce-adapter:6565 true (if endpointName is not set)
endpointName String Property The endpoint name to lookup the Spring gRPC service configuration . wcs true (if endpoint is not set)
locale String Property The ISO locale code for the connected Catalog. This overwrites the Site locale. It is only needed if the CoreMedia Site locale differs from the Shop locale and if you need the exact Shop locale to access the catalog. en-US false
currency String Property The displayed currency for all product prices. USD false. If not set, the currency will be retrieved from the site locale.
storeConfig Struct Property Struct property containing store configuration. true
storeConfig.id String Property Store id that is used to access the store. If the StoreInfoHandler is deployed on the HCL Commerce Server side, it can be retrieved automatically by mapping an existing store name. 700012345678 false
storeConfig.name String Property Store name that is used to access the store. If the StoreInfoHandler is deployed on the HCL Commerce Server side, the name is used to retrieve the store id. AuroraESite true
catalogConfig Struct Property Struct property containing catalog configuration. In a multi-catalog scenario additional catalog configurations can be added via the additionalCatalogConfigs configuration. The catalog behind the catalogConfig entry is treated as default catalog then. true
catalogConfig.id String Property Catalog id that is used to access the catalog. If not set, the ID of the default catalog is used. 300012345678 false
catalogConfig.name String Property Catalog name that is used to display a catalog name (e.g in the Studio library). If not set, the ID of the default catalog is used. setting. AuroraESiteSalesCatalog false
catalogConfig.alias String Property Catalog alias that is used in content to store links to catalog items. The alias catalog is reserved and used for the default catalog. If not set, the string catalog is used. master false
additionalCatalogConfigs Struct List List of additional catalog configurations used for multi-catalog scenario. Each entry should provide the properties described earlier for the catalogConfig entry. The property alias and at least one of id or name must be defined.   
customEntityParams Struct Property Site specific custom entity parameters, which are attached to the communication with the commerce adapter. See Section 5.4, “Configuring Custom Entity Parameters” for more information. false. If not set, no site specific custom entities will be used.

Table 5.1. Livecontext settings


Note

Note

Be aware, that the locale is also part of each shop context. It is defined by the locale of the site. That means all localized product texts and descriptions have the same language as the site in which they are included and one specific currency.

Configuring Multiple Catalogs

By default, CoreMedia Studio only shows the default catalog of the HCL Commerce system. However, you can configure multiple catalogs which can be defined in Studio via a struct list property additionalCatalogConfigs below the commerce struct. Proceed as follows:

  1. Open the LiveContext Settings content in Sites/<Site Name>/<Locale Country>/<Locale Language>/Options/Settings (for example Sites/Aurora Augmentation/United States/English/Options/Settings).

  2. If it does not exist, add a Struct List property named additionalCatalogConfigs below the commerce Struct to the Settings field.

  3. For each catalog add a Struct item to the Struct List property additionalCatalogConfigs. Each entry should at least define an alias and an id or name property. The property alias is used to link to catalog items internally and shouldn't be changed anymore. The property id corresponds to the id of the catalog in the commerce system. The property name corresponds to the name of the catalog in the commerce system.

    Catalog code in commerce system

    Figure 5.1. Catalog code in commerce system


    For backward compatibility, the default catalog needs to have the alias "catalog".

    Catalog settings

    Figure 5.2. Catalog settings


Name Type Value
The alias for the catalog. You can freely define a name which must be alphanumeric including '_' and '-'. Only the default catalog requires the alias "catalog". String The HCL Commerce code of the catalog

Table 5.2. Catalog aliases


Caution

Caution

The defined aliases are then used as part of internal IDs which are persisted in the system.

Therefore, choose the alias wisely before the multi-catalog feature is used. Changing the alias afterward would require some cumbersome data migration.

Enabling Dynamic Pricing

Dynamic price rendering is disabled by default. If this feature is not used on HCL Commerce side, then it is not necessary to turn it on on CMS side. It avoids an additional call to HCL Commerce that is not needed in such a scenario.

But if you use personalized price rules in HCL Commerce then it is necessary to switch this feature on.

Name Type Description Example Required
config.id String Property The configuration ID defined in Spring configuration myStore true
dynamicPricing.enabled Boolean Property Personalized product prices enabled true false

Table 5.3. Currency configuration


Please see Section 5.1, “Configuring the Commerce Adapter” to get the information how the dynamic prices can be switched on on HCL Commerce side.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

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