Last active
August 29, 2015 14:02
-
-
Save jrodriguez-ifuelinteractive/5226f1a0f7a0523caeee to your computer and use it in GitHub Desktop.
Checkout Success Page Tester
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Ifuel_Successtest_IndexController extends Mage_Core_Controller_Front_Action | |
{ | |
/** | |
* Success page redirect | |
*/ | |
public function testAction() | |
{ | |
if (!Mage::helper('core')->isDevAllowed()) { | |
$this->_forward('noroute'); | |
return; | |
} | |
$orderId = (int)$this->getRequest()->getParam('order_id'); | |
// Load the order | |
$order = Mage::getModel('sales/order')->load($orderId); | |
Mage::getSingleton('checkout/type_onepage')->getCheckout() | |
->setLastOrderId($order->getId()) | |
->setLastSuccessQuoteId($order->getQuoteId()) | |
->setLastQuoteId($order->getQuoteId()); | |
$this->_redirectUrl('/checkout/onepage/success/'); | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment