我正在开发一个Magento网站,最近从CE 1.9.0升级到CE 1.9.1。我注意到我现在在尝试以访客身份结账时出现错误。
1) 我在步骤 1
中选择客人结账2) 我填写了账单信息中的表格,并选中"运送到此地址"
3)当我继续时,我收到带有"请确保您的密码匹配"错误的弹出框
在系统>配置>销售>结帐中,我有以下内容
启用一页结帐 = 是
允许访客结账 = 是
我查看了Google搜索中的一些建议,包括堆栈溢出的结果,尽管他们在主题中列出了该问题,但它们似乎并不相关。我看到的解决方案似乎与密码不匹配和验证问题有关。
任何人都可以建议解决自升级以来似乎弹出的来宾购物车登录问题吗?
这
有点旧,但值得回答...这似乎会影响具有结帐模块(如模板-主 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",您应该确保向前和向后兼容,并且不会搞砸任何东西。