Magento购物车空取消付款

时间:2016-03-18 12:11:57

标签: magento instamojo

我在付款部分使用Instamojo。对于取消付款或付款失败,购物车变空。如何克服?

我想保存购物车项目以进行不成功的付款尝试。

我曾经取代过这个:

$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->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));

有了这个:

 /**
* 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()->setIsActive(1) ;
}
$this->getOnepage()->getQuote()->save();
 $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
/app/code/core/Mage/Checkout/controllers/OnepageController.php

中的

但它不起作用。

0 个答案:

没有答案