paypel在取消订单后,回到网站,会出现:the cart is empty,但是我们想要他回到购物车页面,而且购物车里面有我们还没有付款成功的产品,需要修改magento的文件
app/code/core/Mage/Checkout/controllers/OnepageController.php
line 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();
}