1

I am working on Depoto.

In this, Cart becomes empty when cancel the payment transaction in one page checkout. I am using IWD one page checkout. I developed this on Magento-1.9.1.1

1

I got the solution for my question.

Please open app/code/core/Mage/Checkout/controllers/OnepageController.php

Search for

    $this->getOnepage()->getQuote()->save();

    //this makes the cart empty (sets the quote as converted to order)
    if (isset($redirectUrl)) {
        $result['redirect'] = $redirectUrl;
    } 

$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));

And replace this with the following.

if (isset($redirectUrl)) {
    $result['redirect'] = $redirectUrl;
    $this->getOnepage()->getQuote()->setIsActive(1);
}

$this->getOnepage()->getQuote()->save();
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.