Connector for HCL Commerce Manual / Version 2010
Table Of ContentsNote
This is only necessary when you use AJAX calls (for Elastic Social, for example) in the commerce-led scenario.
Since the CAE must know about generated commerce cookies and vice versa, it is necessary to configure specific cookie domains for both, the CAE and the commerce system, so that cookies are exposed to both systems.
The CoreMedia system must be hosted on servers belonging to the same domain. Example: If the domain given here is .xyz.com, then the CoreMedia CAE must be accessed from the commerce system via a (logical) server name servername.xyz.com.
In order to enable session synchronization between the CoreMedia and HCL Commerce system do the following steps:
Enable the
com.coremedia.livecontext.hybrid.CookieLeveler
within theweb.xml
of your commerce store front(WCDE-INSTALL/workspace/Stores/WebContent/WEB-INF/web.xml
) and preview(WCDE-INSTALL/workspace/Preview/WebContent/WEB-INF/web.xml
) webapp. Put its filter mapping in front of all other filter mappings and set the cookie domain to the shared domain of your CAE and commerce system.<filter> <filter-name>Cookie Leveler</filter-name> <filter-class>com.coremedia.livecontext.hybrid.CookieLeveler</filter-class> </filter> <filter-mapping> <filter-name>Cookie Leveler</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <context-param> <param-name>com.coremedia.fragmentConnector.cookieDomain</param-name> <param-value>.FQDN</param-value> </context-param>
If you want to rewrite additional cookies of your own commerce customizations, you can configure a list of all cookies to be rewritten via a comma separated list.
<filter> <filter-name>Cookie Leveler</filter-name> <filter-class>com.coremedia.livecontext.hybrid.CookieLeveler</filter-class> <init-param> <param-name>cookieFilter</param-name> <param-value>WC_,WCP_,myCustomCookie</param-value> </init-param> </filter>
Per default commerce cookies starting
WC_
andWCP_
are mapped.Set the cookie domain for the JSESSION cookie on the commerce server, for example via the HCL console.
For the CAE the cookie domain is configurable in the Tomcat configuration file
context.xml
. The cookie domain can be set here by setting the attribute
sessionCookieDomain
for the Context
element. The
cookie domain must be configured with a leading "." so that the CAE session cookie is readable
from commerce system that run with the same subdomain, for example
.myDomain.com
.