How to customize lower level components in Spartacus?

时光总嘲笑我的痴心妄想 提交于 2020-06-29 06:39:27

问题


I'm trying to customize the ProductListItemComponent and the ProductGridItemComponent in order to add some more functionality like a Stock counter.

After some quick research I came to the conclusion that they can't be remapped using the cmsComponents object, only the actual CMS Component, the CMSProductListComponent, can be remapped.

If my assumption is correct, what would be the best approach on customizing these components?

Thank you for your time!


回答1:


Yup!

You are right! You can't customize ProductListItemComponent or ProductGridItemComponent via remapping it like a CMS Component, you should customize it over higher lever CMS Component - ProductListComponent.

And here you can find GitHub issues: https://github.com/SAP/spartacus/issues/4231 and https://github.com/SAP/spartacus/issues/4441, which relates to above problem.



来源:https://stackoverflow.com/questions/62157099/how-to-customize-lower-level-components-in-spartacus

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!