zl程序教程

您现在的位置是:首页 >  其他

当前栏目

SAP Spartacus 和 SmartEdit 集成的一些 bug

BUGSAP集成 一些 Spartacus
2023-09-14 09:02:54 时间

我正在尝试使用 spartacus 和 smartedit,特别是我有兴趣查看选择分阶段产品目录版本的预览模式是否工作正常,但显然不是…我看不到对我在 stage 版本上做的属性,如果我查看浏览器发送到服务器的 occ 调用,我本来希望在每个 occ 调用中总是看到 cmsTicketid 参数,因为据我所知,参数将设置 会话属性,如要使用的目录版本等,并且由于 occ 服务是无状态的,我想每个请求都需要发送 param ,但事实并非如此。

您是否知道有关此功能的任何错误,还是我遗漏了什么?

(1) we 创建一个 preview ticket,持有 context informations (content and product catalog version, language, time, …)

(2)then we pass the ticket in every occ request
(3)a filter on the occ web app manage to restore the context in the session (setting language, catalog versions, etc) based on the preview ticket

occ is stateless, it is stateless in terms of session … but there is state in terms of cart, etc.

In practice although it is ‘stateles’ it actually create a session for the length of each request.

but you’ve to pass the ticketid for every request.

代码:https://github.com/SAP/spartacus/blob/develop/feature-libs/smartedit/root/http-interceptors/cms-ticket.interceptor.ts

if (this.service.cmsTicketId && request.url.includes('/cms/'))

issue created:https://github.com/SAP/spartacus/issues/12954