Skip to content

Instantly share code, notes, and snippets.

@jrodriguez-ifuelinteractive
Last active August 29, 2015 14:02
Show Gist options
  • Save jrodriguez-ifuelinteractive/126691f408958a07e459 to your computer and use it in GitHub Desktop.
Save jrodriguez-ifuelinteractive/126691f408958a07e459 to your computer and use it in GitHub Desktop.
app\code\core\Mage\Checkout\controllers\OnepageController.php
<?php
if (!$session->getLastSuccessQuoteId()) {
$this->_redirect('checkout/cart');
return;
}
$lastQuoteId = $session->getLastQuoteId();
$lastOrderId = $session->getLastOrderId();
$lastRecurringProfiles = $session->getLastRecurringProfileIds();
if (!$lastQuoteId || (!$lastOrderId && empty($lastRecurringProfiles))) {
$this->_redirect('checkout/cart');
return;
}
// We comment out this line so the session isn't cleared, so it dosen't redirect on refresh.
//$session->clear();
$this->loadLayout();
$this->_initLayoutMessages('checkout/session');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment