从 SAP Spartacus 成功登录之后,能在 Local Storage 里观察到 userId 为 current: 这个 current id 从哪里来的呢?在 Spartacus 应用初始化的时候,从浏览器的 local storage 里取的。参考下图 syncWithStorage 方法: 取到之后,设置到内存中:this.userIdService.setUserID: 手动清除浏
用于元标记的内容尽可能由后端(运行时)数据驱动。例如,产品详细信息页面的图像标签使用主产品图像。另一个示例是产品详细信息页面的标题,它由产品标题、(第一)类别和品牌构成。 如果要进一步自定义元标记的创建,可以实现自定义 PageMetaResolvers。页面解析器为特定页面的元数据生
原文:Migrate Your Accelerator-based Storefront to Project Spartacus 如果您已阅读过“迁移到 Spartacus javascript storefront 项目的五个原因”和“SAP Commerce Cloud Project Spartacus 入门”这两篇文章,您可能想要迁移到基于无状态高性能架构的 storefront, 并且想知道如
原文:Migrate Your Accelerator-based Storefront to Project Spartacus 如果您已阅读过“迁移到 Spartacus javascript storefront 项目的五个原因”和“SAP Commerce Cloud Project Spartacus 入门”这两篇文章,您可能想要迁移到基于无状态高性能架构的 storefront, 并且想知
原文地址 What is Spartacus? Spartacus 是一个免费的开源 JavaScript Web 应用程序,它于 2019 年 5 月发布了 1.0 版本,并且每隔几周就会继续发布新的更新。它允许您为 SAP Commerce Cloud 快速创建自己的基于 JavaScript 的品牌店面。 Spartacus 是使用 Angular 编写的,并作为一组
Connecting to Other Systems Commerce Cloud 解决方案的系统架构由各种系统组成,这些系统通常在各种应用层(包括前端)上进行编排。 Spartacus 默认连接到 SAP Commerce Cloud API,但底层框架也可用于其他系统。 这是通过所谓的“连接器”完成的,可以添加连接器以连接到其他系统。 Comp
slack 在 Spartacus 中覆盖样式的一种方法是在 src/styles.scss 中定义它们。 但是我发现在 Spartacus 3.4 中,我必须添加 !important 指令来覆盖样式。 有没有更好的方法来做到这一点,或者 !important 是覆盖样式的唯一方法? :root { --cx-color-primary: #A7FFF6 !important;
The Spartacus event service provides a stream of events that you can consume without a tight integration to specific components or modules. The event system is used in Spartacus to build integrations to third party systems, such as tag managers and web
官网地址 在典型的 Spartacus 店面中,大部分内容要么来自 CMS,要么来自产品内容。 但是,对于店面站点标签(例如按钮中的文本),内容存储在单独的文件中,并且可以对这些文件进行本地化(即翻译)。 Spartacus 使用 i18next 库作为其翻译机制,并使用 i18next-xhr-backend 延迟加载翻译块。 这两个
对于不需要来自 CMS 的任何数据(例如,登录)的 Angular 或 web 组件,您可以使用 CMSFlexComponent 类型的 CMS 组件作为占位符。 这个 CMS 组件包含特殊的 flexType 属性。 Spartacus 在其 CMS 映射中使用 flexType 属性而不是原始组件类型。 同理,CMS映射中使用的是JspIncludeComponent
Attempting to modify the ProductList page. Found a slot ProductListSlot but doesn’t appear to have a flexcomponent associated with it. So even if I create a custom component and map it to the ProductListComponent, nothing happens. I would like to modify t
Spartacus 是一个 Angular 框架,所以主要应用是 Angular 应用(不是 Vue)。 然而,有可能在 Spartacus 中使用 Web 组件作为 CMS 组件(实验性支持),并且可以使用任何技术创建 Web 组件,包括 Vue。 参考这个文档. Web 组件的主要限制是在 *** 中渲染它们并不容易,这就是为什么支持仍然是实验性
官网 spartacussampledata 扩展为 Spartacus 创建了新的 WCMS 基础站点,这些站点与默认的电子产品、服装和电动工具站点共享相同的产品目录,但内容目录已专门针对 Spartacus 要求进行了修改。 如何下载 您可以从 Spartacus Releases 页面下载 Spartacus Sample Data 扩展。 Spartacu
HTML Tags HTML 标签,尤其是元标签,允许搜索引擎、社交平台和机器人在其平台中使用页面元数据。 通过仔细准备元标记,并定期评估它们的值,您可以提高页面的排名、点击率和可用性。 所有这些都会影响 SEO 和用户体验。 页面元标记被写入 HTML 的头部。 在 HTML5 中,您可以使用各种
Connecting to Other Systems Commerce Cloud 解决方案的系统架构由各种系统组成,这些系统通常在各种应用层(包括前端)上进行编排。 Spartacus 默认连接到 SAP Commerce Cloud API,但底层框架也可用于其他系统。 这是通过所谓的“连接器”完成的,可以添加连接器以连接到其他系统。
Slack 我目前正在 CCv2 中测试 Spartacus 实现的性能,但正在努力寻找一个 pod 大小,其中 node.js 不只是命中内存缓冲区。我怀疑这也与 CCv2 设置有关。 (CCv2:将 pod 大小的内存设置为 X,然后将节点中的 max_old_size_space 设置为 75%,然后节点通过 PM2 运行,CCv2 为 max_memory_r
2021-6-29 17:03 Michele 嗨,团队,我正在尝试使用 spartacus 和 smartedit,特别是我有兴趣查看选择分阶段产品目录版本的预览模式是否工作正常,但显然不是…我看不到对我在 stage 版本上做的属性,如果我查看浏览器发送到服务器的 occ 调用,我本来希望在每个 occ 调用中总是看到 cmsT
SAP Spartacus Definition of Done Coding guidelines Spartacus 团队采用了以下一组规则来保持 Spartacus 代码的可读性和可维护性。 作为贡献者,我们要求您遵守这些规则(即使您发现它们在某处被违反)。 当文件始终不遵循这些规则,并且遵守这些规则会使代码变得更糟时,请遵循本地风格
SAP Customer Data Cloud Integration Spartacus 3.2 版可用。 SAP Customer Data Cloud 允许您启用自定义注册和登录,还可以管理用户配置文件和同意。 需要的系统配置: SAP Commerce Cloud 2011 以及 SAP Commerce Cloud 集成扩展包 2108 SAP Commerce Cloud 2005 以及 SAP
重现方式: npm install and then yarn dev:ssr 错误消息: Compiled successfully. ** Anqular Universal Live Development Server is Listening on http://localhost:4201,open your browser on http://localhost:4201 ** ERROR Error: Uncaught (in promise): Error: RouterMod
https://sap.github.io/spartacus-docs/reference-app-structure/ 该概念在 SAP Spartacus 3.1 版本引入。 这个 Reference App Structure 是 SAP 推荐客户在搭建自己的 Spartacus Storefront 时所用的参考。 Spartacus 包含若干可以 lazy load 的 feature libraries. Customizat
SAP Spartacus PageLayoutService.ts 里的 templateName$ get 操作:返回一个 Observable 对象,包裹的类型为 string. pipe 的第一个操作 filter,目的是确保 page 对象的 template 属性一定存在,避免接下来第二个 map 操作出现返回被 Observable 包裹的 undefined 值的情况。 而在 Pag
PageLayoutService 实现里有一个 cms 依赖:CmsService. 当前页面元数据信息,通过 cms.getCurrentPage 维护。 从 routingService 里拿到当前页面上下文,再从 central 的 ngRx store 里抽取实际数据: routingService.getPageContext 的实现:从 store里读取。 关于 TypeScript 的箭
ng-container 标签只在 design time 可见,运行时会完全从渲染出的 HTML 源代码里被移除。通过 ng-container 加上 SAP Spartacus 自定义实现的 cxFeatureLevel Directive, 可以实现根据配置的 Feature level,动态控制某个页面片段是否显示的效果。 如下图所示,红色高亮区域内的 HTML
该按钮的实现位于 toggle-status.component.html 里,点击后,可以对当前显示的 B2B item 进行 activation 和 deactivation 操作。 toggle(item) 方法的实现: 如果当前 item 处于 active 状态,则当前 toggle 应该执行 deactivation 操作,调用通过构造函数注入的 messageService, 通过