如何知道订单是从经过身份验证的客户或Salesforce Commerce Cloud中的来宾放置的?
您好,我是 Salesforce Commerce Cloud 的新手,我正在开发 SFCC 的控制器版本,即 SGJC 版本。我想知道有什么方法或者我们如何知道下订单的客户是作为访客还是作为认证客户下的订单。我想写一个 if else 重定向逻辑。如果下的订单来自访客,则重定向至 A.isml,否则重定向至 B.isml。 orderMgr 类中的任何方法都会有所帮助。
Hello I am new to salesforce commerce cloud and I am working on controller version of SFCC that is SGJC version. I wanted to know is there is any method or how will we know whether customer who has placed the order has placed as guest or as autheticated customer. I want to write a if else redirection logic. If placed order is from guest redirect to A.isml else redirect to B.isml. Any method from orderMgr class will be helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试使用:
来自 docs
注册客户和经过身份验证的客户之间也有区别。经过身份验证的客户是也已记录的注册客户,具有活动的经过身份验证的会话。
要检查客户是否已通过身份验证,您可以使用 isAuthenticated() 方法而不是 isRegistrered()
You can try to use:
From the docs
There is also a difference between Registered and Authenticated customer. An Authenticated customer is a registered customer that is also logged, with an active authenticated session.
To check if the customer is authenticated you can use isAuthenticated() method instead of isRegistrered()
您可以尝试与下面相同的代码:
Ref 文档。
You can try the code same as below:
Ref docs.