简体   繁体   English

斯巴达克斯 2.0 PDP 插座

[英]Spartacus 2.0 PDP outlets

Looking at the training video "Component Context - Spartacus Extensibility Live Coding Part 4 - SAP Commerce Cloud", it customizes the PDP image component by setting [cxOutletRef]="ProductDetailOutlets.IMAGE".看培训视频《Component Context - Spartacus Extensibility Live Coding Part 4 - SAP Commerce Cloud》,通过设置[cxOutletRef]="ProductDetailOutlets.IMAGE"自定义PDP图像组件。 Looking at the ProductDetailOutlets enum in Spartacus 2.0:查看 Spartacus 2.0 中的 ProductDetailOutlets 枚举:

export declare enum ProductDetailOutlets {
    INTRO = "PDP.INTRO",
    PRICE = "PDP.PRICE",
    SHARE = "PDP.SHARE",
    SUMMARY = "PDP.SUMMARY"
}

There is no "IMAGE" any more.不再有“图像”。 I tested and confirm I can customize PDP.SUMMARY, but then with Spartacus 2.0, how do I customize the IMAGE component on the PDP?我测试并确认我可以自定义 PDP.SUMMARY,但是使用 Spartacus 2.0,我如何自定义 PDP 上的 IMAGE 组件?

Thanks.谢谢。

The video you watched was released long time before Spartacus version 1.0 was released.您观看的视频在斯巴达克斯 1.0 版发布之前很久就发布了。 While outlets are a standard feature , the specific outlet references have been changed after the video was published.虽然网点是一项标准功能,但具体的网点参考在视频发布后已更改。

The product images have transitioned into a CMS component, which means that outlets are not necessary the recommended approach to customise the images.产品图像已转换为 CMS 组件,这意味着商店不是自定义图像的推荐方法。 Instead, you can use th CMS component mapping feature to replace the product image component with a custom component.相反,您可以使用 CMS 组件映射功能将产品图像组件替换为自定义组件。 You read more about this feature at https://sap.github.io/spartacus-docs/customizing-cms-components/ .您可以在https://sap.github.io/spartacus-docs/customizing-cms-components/阅读有关此功能的更多信息。

The type for the product image component is ProductImagesComponent .产品图像组件的类型是ProductImagesComponent

If you like to use outlets, you can also use the component type ( ProductImagesComponent ) as an outlet reference.如果您喜欢使用 outlet,您还可以使用组件类型 ( ProductImagesComponent ) 作为 outlet 引用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM