繁体   English   中英

从CE 1.9.0升级后,Magento CE 1.9.1访客登录“请确保您的密码匹配”错误

[英]Magento CE 1.9.1 Guest Login “Please make sure your passwords match” error after upgrade from CE 1.9.0

我正在开发一个Magento网站,最近从CE 1.9.0升级到CE 1.9.1。 我注意到当我尝试以访客身份退房时出现错误。

1)我在步骤1中选择访客结帐
2)我在“帐单信息”中填写表格,并选中“寄往该地址的船”
3)当我继续时,出现带有“请确保您的密码匹配”错误的弹出框

在系统->配置->销售->结帐中,我有以下内容

启用一页检出=是
允许访客结帐=是

我查看了Google搜索提供的一些建议,包括关于stackoverflow的结果,尽管它们在主题中列出了问题,但它们似乎并不相关。 我看到的解决方案似乎与密码不匹配和验证问题有关。

谁能为升级后突然出现的来宾推车登录问题提出解决方案?

这有点旧,但是值得回答...这似乎会影响带有Checkouts模块(如Templates-Master FireCheckOut)的站点。

从1.9.0跳到1.9.1时,法师核心发生了变化:

/app/code/core/Mage/Customer/Model/Customer.php - Line:840
$confirmation = $this->getConfirmation();

至:

/app/code/core/Mage/Customer/Model/Customer.php - Line:841
$confirmation = $this->getPasswordConfirmation();

就FireCheckOut而言,这意味着我必须进行以下更改:

/app/code/local/TM/FireCheckout/Model/Type/Standard.php ~line 797 to:
if ($quote->getCheckoutMethod() == self::METHOD_REGISTER) {
    // set customer password
    $password = $customerRequest->getParam('customer_password');
    if (empty($password)) {
        $password = $customer->generatePassword();
        $customer->setPassword($password);
        $customer->setConfirmation($password);
        $customer->setPasswordConfirmation($password); // Added this line ***
    } else {
        $customer->setPassword($customerRequest->getParam('customer_password'));
        $customer->setConfirmation($customerRequest->getParam('confirm_password'));
        $customer->setPasswordConfirmation($customerRequest->getParam('confirm_password')); // Added this line ***
    }
} else {
    // emulate customer password for quest
    $password = $customer->generatePassword();
    $customer->setPassword($password);
    $customer->setConfirmation($password);
    $customer->setPasswordConfirmation($password); // Added this line ***
    // set NOT LOGGED IN group id explicitly,
    // otherwise copyFieldset('customer_account', 'to_quote') will fill it with default group id value
    $customer->setGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID);
}

通过同时使用“ setConfirmation”和“ setPasswordConfirmation”,您应该确保向前和向后兼容,并且不要弄乱任何东西。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM