我正在尝试创建一个新的加速器。我通过extgen (yb2Baccelerator)创建了一个新的扩展,之后我在hmc中创建了一个新的cmssite。cmssite ( hmc > wcms > websites)和前端扩展之间的链接是什么?感谢你的帮助
发布于 2020-01-09 00:49:49
好的,排序的答案是: CMSSite中定义的url模式。以下是创建CMSSite的示例:
INSERT_UPDATE CMSSite ; uid[unique=true] ; theme(code) ; channel(code) ; stores(uid) ; contentCatalogs(id) ; defaultCatalog(id) ; defaultLanguage(isoCode) ; urlPatterns ; active ; previewURL ; startingPage(uid,$contentCV) ; urlEncodingAttributes ;
; $siteUid ; blue ; B2B ; $storeUid ; $contentCatalog ; $productCatalog ; $defaultLanguage ; (?i)^https?://[^/]+(/[^?]*)?\?(.*\&)?(site=$siteUid)(|\&.*)$,(?i)^https?://$siteUid\.[^/]+(|/.*|\?.*)$,(?i)^https?://api\.hybrisdev\.com(:[\d]+)?/rest/.*$,(?i)^https?://localhost(:[\d]+)?/rest/.*$ ; true ; $storefrontContextRoot/?site=$siteUid ; homepage ; storefront,language CMSSite A CMS站点配置选项包括:
storefront.
locale的storefront.
希望能有所帮助。
发布于 2020-01-09 00:49:41
新创建的storefront扩展应该包含CMSSiteFilter java类。此筛选器负责在Hybris会话中设置CMSSite、Catalog等。
将在会话中设置的CMSSite将根据请求URL (即,当您尝试访问您的分机时放入浏览器中的)来决定。
默认情况下,您可以使用包含站点id的查询参数访问网站,如下所示:
https://localhost:9002/?site=id_of_the_website&clear=true如果您的店面的webroot不同于,请参阅以下示例,该示例可用于访问B2C OOTB(开箱即用)服装店:
https://localhost:9002/yacceleratorstorefront/?site=apparel-uk&clear=truehttps://stackoverflow.com/questions/59648556
复制相似问题