Php Magento CE 1.9.1来宾登录”;请确保您的密码匹配";从CE 1.9.0升级后出错

Php Magento CE 1.9.1来宾登录”;请确保您的密码匹配";从CE 1.9.0升级后出错,php,e-commerce,magento-1.9.1,Php,E Commerce,Magento 1.9.1,我正在开发一个Magento站点,最近从CE1.9.0升级到了CE1.9.1。我已经注意到,我现在在尝试作为客人结账时出现了一个错误 1) 我在步骤1中选择客人结账 2) 我在账单信息中填写表格,并勾选“发送到此地址” 3) 当我继续时,我会看到弹出框中出现“请确保您的密码匹配”错误 在系统->配置->销售->结帐中,我有以下内容 启用一页签出=是 允许客人结账=是 我看过谷歌搜索的一些建议,包括stackoverflow的搜索结果,虽然他们在主题中列出了这个问题,但似乎并不相关。我看到的解决方

我正在开发一个Magento站点,最近从CE1.9.0升级到了CE1.9.1。我已经注意到,我现在在尝试作为客人结账时出现了一个错误

1) 我在步骤1中选择客人结账
2) 我在账单信息中填写表格,并勾选“发送到此地址”
3) 当我继续时,我会看到弹出框中出现“请确保您的密码匹配”错误

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

启用一页签出=是
允许客人结账=是

我看过谷歌搜索的一些建议,包括stackoverflow的搜索结果,虽然他们在主题中列出了这个问题,但似乎并不相关。我看到的解决方案似乎与密码不匹配和验证问题有关


有人能为升级后出现的来宾购物车登录问题提供解决方案吗?

这有点陈旧,但值得回答。。。这似乎会影响带有签出模块(如模板主FireCheckOut)的站点

在从1.9.0跳到1.9.1的过程中,法师核心发生了变化:

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

在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”,您应该确保前向和后向兼容性,并且不会弄乱任何东西

还值得一提的是,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);
}