Connector for SAP Commerce Cloud Manual / Version 2401
Table Of Contents
Each lc:include
tag requests an HTML fragment via HTTP from the CAE.
Every link within a fragment that is requested by the commerce system from the CAE is processed by the
LiveContextLinkTransformer
class. The transformer only applies for
fragment requests and finally requests URL templates from the LinkRepository
on the Commerce Adapter side.
For fragment request the Commerce Adapter returns JSON strings to the CAE.
Each of these JSON objects contains at least the values of the constants objectType
and
renderType
and the ID of the content or commerce object.
Assume the HTML fragment contains a link to a CMArticle
content item. Instead
of rendering the regular link, for example
http://cae-host/blueprint/servlet/page/mySite/mySegment/mySeoContent-4712
the corresponding Link generated by the LiveContextLinkResolver
would
look like:
a href="<!--CM { "id":"cm-1696-4712", "renderType":"url", "externalSeoSegment":"mySeoContent-4712", "objectType":"content"} CM-->" ...
The CoreMedia Fragment Connector
on the commerce side parses the JSON, identifies the object
type and rendering type and applies a template to render a commerce link. For the given example,
the template Content.url.jsp
is used, applied by the pattern
"<OBJECT_TYPE>.<RENDER_TYPE>.jsp".
The JSP file on the commerce side finally generates the resulting URL.