This is my xml :
<global>
<events>
<sales_order_place_after>
<observers>
<test_magewidget_model_observer>
<type>singleton</type>
<class>Test_MageWidget_Model_Observer</class>
<method>testRedirection</method>
</test_magewidget_model_observer>
</observers>
</sales_order_place_after>
</events>
</global>
This is my Observer :
class Test_MageWidget_Model_Observer {
public function testRedirection($observer) {
try {
Mage::app()->getResponse()->setRedirect(Mage::getUrl("checkout/cart"));
Mage::log('Hi', null, 'magewidget.log');
} catch (Exception $e) {
Mage::logException($e->getMessage());
}
}
After placing order event being triggered, but redirection not working properly. It's showing in Browser network response, but not reflecting on the browser.
What can be the reason behind this? Please help me.