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

来源:互联网 发布:matlab2016a怎么编程 编辑:程序博客网 时间:2024/05/17 01:46

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/


原创粉丝点击