we can redirect to the referrer from magento observer like below
Mage::getSingleton('core/session')->addError('your error message'); // to show your message after redirection
$url = Mage::helper('core/http')->getHttpReferer() ? Mage::helper('core/http')->getHttpReferer() : Mage::getUrl();
Mage::app()->getFrontController()->getResponse()->setRedirect($url);
Mage::app()->getResponse()->sendResponse();
exit ;
$url = Mage::helper('core/http')->getHttpReferer() ? Mage::helper('core/http')->getHttpReferer() : Mage::getUrl();
Mage::app()->getFrontController()->getResponse()->setRedirect($url);
Mage::app()->getResponse()->sendResponse();
exit ;
The blog was absolutely fantastic! Lot of great information which can be helpful in some or the other way. Keep updating the blog, looking forward for more contents...Great job, keep it up..
ReplyDeletemagento development company in bangalore
Nixw Post!!
ReplyDelete