문제

I am using Magento Enterprise, with a Datacash 3D Secure payment module.

In the event of an error during the payment process I want the user returned to the onepage checkout with their basket intact. Currently when the user returns to the checkout the basket is empty so they are then forwarded to the "checkout/cart" because they have no items.

I thought it might be a problem with my code so I have the initial payment action redirecting straight away with an error back to the onepage checkout.

 public function redirectAction() {
  Mage::getSingleton('core/session')->addError("There was a problem with the payment gateway. Please try again");
  $session = Mage::getSingleton('checkout/session');
  return $this->_redirect('checkout/onepage/', array('_secure'=>true));
}

However on returning to the checkout page the basket is empty. Adding in the following log into the indexAction of the onepage checkout I get "Quote ". Looking in the database the quote has had its active status set to 0.

 error_log("Quote ".Mage::getSingleton('checkout/session')->getQuoteId());

I have not came across this problem with the standard Magento only with Enterprise. Has anyone come across this issue? Ideally I do not want customers having to add products to the basket again. Its like its conflicting with some sort of Magento Enterprise module.

Thanks in advance for any help!

도움이 되었습니까?

해결책

Basically you answered your own question. load the quote (if it's not available) and perform this:

$yourQuote()->setIsActive(true);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top