Is there any reason checkout_onepage_controller_success_action
event is dispatched after the layout is loaded. Here is an extract from Mage_Checkout_OnepageController::successAction
:
$session->clear();
$this->loadLayout();
$this->_initLayoutMessages('checkout/session');
Mage::dispatchEvent('checkout_onepage_controller_success_action', array('order_ids' => array($lastOrderId)));
$this->renderLayout();
Best Answer
I would say to do things after the rendering (and after sending away the response?)
If you want to do things before rendering, just use: