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

本文介绍了一个Magento中关于PayPalExpress支付方式的bug,在客人结账时不正确地传递电子邮件地址,导致用户无法收到订单确认邮件。提供了一个临时解决方案,通过修改Magento核心文件来确保即使在未登录状态下也能正确收集和使用客户信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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/


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值