1

I am developing a Magento site and recently upgraded from CE 1.9.0 to CE 1.9.1. I have noticed that I now have an error when I attempt to checkout as a guest.

1) I select the guest checkout in step1
2) I fill out the form in Billing Information and leave "ship to this address" checked
3) When I continue I get the popup box with the "Please make sure your passwords match" error

In System->Config->Sales->Checkout I have the following

Enable Onepage Checkout = Yes
Allow Guest Checkout = Yes

I have looked at a few suggestions from a Google search, including results on stackoverflow, and although they list the issue in their subject they do not seem relevant. The solutions I have seen seem to relate to passwords not matching and validation issues.

Can anyone suggest a solution to the guest cart login issue that seems to have popped up since the upgrade?

4

1 回答 1

2

这有点陈旧,但值得回答......这似乎会影响具有结帐模块的站点,例如 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”,您应该确保前向和后向兼容性并且不会搞砸任何事情。

于 2015-03-27T21:52:07.747 回答