您的位置:首页 > 其它

magento 付款失败之后购物车被清空的解决方法

2013-05-15 15:38 309 查看
magento 购物车用支付宝准备购买,如果跳到了支付宝页面,却没有付款,返回到购物车中,会发现下的单居然被清空了,这个时候需要重新添加购物车,多麻烦 。

解决方法如下:
sudo vim app/code/core/Mage/Checkout/controllers/OnepageController.php

556 //$this->getOnepage()->getQuote()->save();
557 /*
558 when there is redirect to third party, we don't want to save order yet.
559 we will save the order in return action.
560 /
561 if (isset($redirectUrl)) {
562 $result['redirect'] = $redirectUrl;
563 }else{
564 $this->getOnepage()->getQuote()->save();
565 }
566

注释掉 556 行,新添 564行。
解决 。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐