SmartEdit的1家商店,每个商店都有不同的产品目录
我正在使用SAP Commerce 2011,并且有一个WCMS网站,其中有4家基础商店,每个商店都有不同的产品目录。我还拥有逻辑,可以让用户选择他想看的基本存储。选择基本存储在会话中使用DefaultCmsSiteservice.setCurrentCatalogversion设置相关目录版本
。
这效果很好,但在Smartedit中不行。 CMSSITEFILTER调用每个请求的方法getContextInformationLoader()。初始inizepreviewrequest。这将获取WCMS网站的默认产品目录,并在会话中设置其活动版本,从而覆盖了上面的逻辑。因此,我无法在SmartEdit中打开PDP,因为引用了错误的目录版本。
我想知道为什么Smartedit不支持拥有多个基础商店的标准方案,EAHC具有不同的产品目录!
有什么想法解决这个问题吗?
I am using SAP Commerce 2011 and I have a WCMS site with 4 base stores, each having a different product catalog. I have also logic that lets the user select which base store he wants to see. Selecting a base store sets the related catalog version in session, using
DefaultCMSSiteService.setCurrentCatalogVersion.
This works well, but not in SmartEdit. The CMSSiteFilter calls the method getContextInformationLoader().initializePreviewRequest with every request. This gets the default product catalog of the WCMS site and set its active version in session, overriding my logic above. Therefore, I can not open the PDP in smartedit as a wrong catalog version is referenced.
I wonder why smartedit does not support such a standard scenario of having multiple base stores, eahc with different product catalog!
Any idea how to solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,智能编辑代码没有考虑每个站点有多家基础商店和每个基本商店的产品目录的情况。我实施的解决方法如下:
禁用ActiveBasesitePreviewStrategy。
解释:
方法getContextInformationLoader()。初始InitializepReviewRequest调用3个策略来初始化预览请求。以上是其中之一。它在会话中设置了Active站点以及其他内容,其中包括默认目录版本。
我们只想设置活动站点。这是该策略设定的其他事项,它们设置在代码中的其他位置。因此,这种策略不是必需的。
因此,在自定义扩展中xxx-spring.xml添加以下
defaultpreviewrequeststrategieslist表示注入了ContextInformationLoader中注入的策略列表(请参阅AcceleratorCMS-Spring)。我只是从中删除了ActiveBasesitePreviewStrategy。
It turns out, that smart edit code does not consider the case of having multiple base stores per site and a product catalog per base store. The workaround I implemented is the following:
Disable the ActiveBaseSitePreviewStrategy.
Explanation:
The method getContextInformationLoader().initializePreviewRequest calls 3 strategies to initialize the preview request. The above is one of them. It sets in the session the active site together with other things, among which is the default catalog version.
We want only to set the active site. This and also the other things set by this strategy, they are set in other places in the code. So this strategy is not necessary.
So in a custom extension xxx-spring.xml add the following
defaultPreviewRequestStrategiesList represents the list of strategies injected in ContextInformationLoader (see acceleratorcms-spring). I just removed ActiveBaseSitePreviewStrategy from it.