Connector for HCL Commerce Manual / Version 2101
Table Of ContentsHCL Commerce contains a default SEO-URL configuration for its shopping pages, such as product detail pages or category landing page. For a seamless integration of CoreMedia content pages like CoreMedia article pages the SEO-URL configuration needs to be extended. The HCL Commerce Workspace archive comes with a SEO-URL configuration, which you can apply to your project HCL Commerce workspace.
The CoreMedia SEO-URL configuration is required for the usage of CoreMedia Content Display in your HCL Commerce environment.
As a prerequisite, SEO URLs require the custom access control policies, installed in Section 3.11, “Deploying the CoreMedia Widgets”.
In order to enable the CoreMedia SEO URLs do the following steps:
Define the SEO pattern and its mapping for a given StoreName (Aurora or AuroraEsite, for instance). See the HCL documentation at https://help.hcltechsw.com/commerce/8.0.0/seositemap/concepts/csdSEOpatternfiles.html for more details about SEO configuration.
To do so, copy the SEO pattern file
workspace/Stores/WebContent/WEB-INF/xml/seo/stores/{StoreName}/SEOURLPatterns-CoreMedia.xml
to your project workspace.Note
For development, create a file
.reload
(text file) in the same directory and add this line:reloadinterval = 30
. This will reload the SEO pattern file every 30 seconds.Configure the handling of SEO Requests as follows:
Apply the Struts configuration from
workspace/Stores/WebContent/WEB-INF/struts-config-lc2.xml
from the CoreMedia archive to your project workspace. Do not forget to change storeIDs to your needs. The storeID is the number at the end of the values of thename
attributes.Check, that the Struts configuration is already referenced from the
init-param
with name "config" in your HCL Commerceweb.xml
file. Otherwise, copy the configuration from theworkspace/Stores/WebContent/WEB-INF/web.xml
file.Check if the copied JSP files already contain the parameter
externalSeoSegment
:The SEO pattern specifies that the path segment after
/cm/
will be mapped to a JSP parameterexternalSeoSegment
. Make sure the parameter is actually recognized and prepared to be passed to the lc-include tag aslc_externalRef
parameter.<c:if test="${not empty param.externalSeoSegment}"> <c:set var="lc_externalRef" value="cm-seosegment:${param.externalSeoSegment}"/> </c:if>
Otherwise, check the JSP files in the CoreMedia archive file and copy the settings to the JSPs in the HCL workspace.
Check SEO links
As defined in
SEOURLPatterns-CoreMedia.xml
, the URL patternCoreMediaContentURL
can be used from within the HCLwcf:url
tag. You can find the implementation of URL generation for CoreMedia content with this tag in the JSP fileWCDE-ZIP/workspace/Stores/WebContent/Widgets-CoreMedia/com.coremedia.commerce.store.widgets.CoreMediaContentWidget/impl/templates/Content.url.jsp
. Check that this file is already included in your HCL workspace. Otherwise, copy it.
Note
In oder to adapt the predefined URL prefix "/cm" for SEO URLs for CoreMedia Content Pages to your needs, you need to customize
the HCL Commerce SEO URL pattern for CoreMedia Content Pages
the property
wcs.link.cm-path-identifier
in your Commerce Adapter deployment