SAP Commerce Cloud Product Review 的添加逻辑

举报
汪子熙 发表于 2022/07/31 10:58:54 2022/07/31
【摘要】 点了 Write Review 按钮之后,调用 ProductReviewService 的 add 方法:该方法 dispatch 一个新的 action:override the ProductReviewService to dispatch a custom action to an effect they would create with the logic they need....

点了 Write Review 按钮之后,调用 ProductReviewService 的 add 方法:

该方法 dispatch 一个新的 action:

override the ProductReviewService to dispatch a custom action to an effect they would create with the logic they need.

搜索 POST_PRODUCT_REVIEW, 看看接收方是谁。

答案是 『ProductReviewsEffect:接收了该 Action 之后,调用 productReviewsConnector,消费 OCC API 添加 post,待添加成功后,返回新的 Action 对象 ProductActions.PostProductReviewSuccess,其中包含了 ReviewResponse.

同样在该 effect 内部,接收到 POST_PRODUCT_REVIEW_SUCCESS 之后,抛出 Thank you for review 的成功消息。

问题

解答

The easiest and recommended way to override basic primary colors, as of version 4.0, is by changing the compiled values of the CSS variables. But change them inside a CSS body selector, instead of a :root selector.

Example of storefrontapp/src/styles.scss file:

/* You can add global styles to this file, and also import other style files */

$styleVersion: 4.0;
@import '~@spartacus/styles/index';

$useLatestStyles: true;

@import '@spartacus/styles';
@import '@spartacus/styles/scss/theme/santorini';

body {
  --cx-color-primary: green;
  --cx-color-seconday: #8aa39b;
  --cx-color-text: #5c6f68;
  --cx-color-background: #95d9c3;
  --cx-color-dark: #a4f9c8;
}

生效了:

【声明】本内容来自华为云开发者社区博主,不代表华为云及华为云开发者社区的观点和立场。转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息,否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。