您的位置:首页 > 其它

解决magento1.6快速支付不能自动发送邮件的问题

2012-09-18 15:48 567 查看
Magento appears to have a bug whereby if a user places an order using paypal express when they’re not logged into your site (ie: using the ‘guest checkout’ functionality of magento their email address will not
be passed through correctly. One annoying symptom of this is that the user won’t receive any order confirmation, or order update emails.

Solved problem

To fix temporarily Modify app/code/core/Mage/Paypal/Model/Express/Checkout.php and go down
to: _prepareCustomerQuote() and insert the following line before “$quote->setCustomer($customer);” near the end of the function:

if(!($this->getCustomerSession()->isLoggedIn()))

{

if (isset($customerBilling)) {

$customer->setEmail($customerBilling->getEmail());

$customer->setFirstname($customerBilling->getFirstname());

$customer->setLastname($customerBilling->getLastname());

}

if (!$quote->getCustomerId()) {

$quote->setCustomerIsGuest(true)->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID);

}}

website source:

http://www.magentocommerce.com/boards/viewthread/276648/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: