paypal订单取消后转向购物车页面!
paypal是magento默认就存在的支付方式,但是在进入paypal页面,用户点击取消后,回到网站,购物车是空的,或者有时候不是回到购物车页面,这样对客户体验不是很好,需要修改
文件为:
app/code/core/Mage/Checkout/controllers/OnepageController.php
在该文件的484 - 491行
$this->getOnepage()->getQuote()->save();
/**
* when there is redirect to third party, we don't want to save order yet.
* we will save the order in return action.
*/
if (isset($redirectUrl)) {
$result['redirect'] = $redirectUrl;
}
改为:
//$this->getOnepage()->getQuote()->save();
/**
* when there is redirect to third party, we don't want to save order yet.
* we will save the order in return action.
*/
if (isset($redirectUrl)) {
$result['redirect'] = $redirectUrl;
}
else {
$this->getOnepage()->getQuote()->save();
}
重新编译,刷新缓存,好了!
测试一下,看看!