我如何在 Ubercart 中授予特定角色?
我正在尝试向订购金额等于或大于 100.00 欧元的用户授予特定角色:条件操作非常接近成就,但我在该操作上失败了(需要 PHP)。
如何在 Ubercart 条件操作中使用 PHP 操作授予角色?
I'm trying to grant a specific role to users that order an amount equal or greater than 100.00 €: Conditional Actions is going really near the achievement, but I'm failing on the action (PHP required).
How can I grant a role using a PHP action in Ubercart Conditional Actions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
基于一些相关 线程,我认为您想要添加一个“执行自定义 PHP 代码”操作,如下所示(替换为第 3 行中适当的角色名称):
Based on a couple of related threads, I think you want to add an "Execute custom PHP code" action along the lines of the following (substituting in the appropriate role name in line #3):
提供的代码需要关闭两个括号。我删除了
if
语句,从订单中获取了 uid 并修复了 uid 设置(它是“1”):Code provided needs to close two brackets. I dropped the
if
statements, grabbed the uid from the order and fixed the uid setting (it was '1'):