Hotcakes 1.10 - 密码已重置当以访客身份使用结账时开始发送电子邮件

Hotcakes 1.10 - Password has been reset email is begin sent when using checkout as a guest

我们的网站出现问题。当客户以访客身份结账时,系统会向用户发送一封包含随机生成密码的电子邮件。

在尝试按照 https://hotcakescommerce.zendesk.com/hc/en-us/articles/209539786-Replacing-the-User-Account-Creation-Workflow-Task 上的指南自定义行为以便不发送电子邮件后,我们意识到演示代码无法编译。似乎缺少某些功能(可能是早期版本中的重大更改)。不起作用的代码在 LoginNewUser() 内部。

private static void LoginNewUser(OrderTaskContext context, CustomerAccount n)
{
  string errorMessage = string.Empty;
  string userId = string.Empty;
  UserAccount userAcc = null;
  Hotcakes.Commerce.Dnn.DnnAccountService.LoginDnnUser(n.Username, n.Password, context.HccApp.CurrentRequestContext.RoutingContext.HttpContext, out errorMessage, out userAcc);
}

这里的错误是:

有人知道如何解决这两个错误吗?之后,自定义工作流程将允许我不发送电子邮件。

谢谢

尝试将您的 LoginNewUser 方法更改为如下例所示:

private static void LoginNewUser(OrderTaskContext context, CustomerAccount n)
{
    string errorMessage = string.Empty;
    string userId = string.Empty;

    context.HccApp.MembershipServices.LoginUser(n.Username, n.Password, out errorMessage, out userId);
}