Magento redirect from observer


Magento redirect from observer : You can redirect from magento observer as below.


Magento redirect from observer

$path = 'path to redirect';
 Mage::app()->getResponse()->setRedirect(Mage::getUrl($path));
 Mage::app()->getResponse()->sendResponse();  
 exit;

Magento redirect from observer Example

$path = 'checkout/onepage';
 Mage::app()->getResponse()->setRedirect(Mage::getUrl($path));
 Mage::app()->getResponse()->sendResponse();  
 exit;

Advertisements

Add Comment

📖 Read More