{"id":620,"date":"2012-12-16T10:50:02","date_gmt":"2012-12-16T10:50:02","guid":{"rendered":"http:\/\/techblog.vifashion.vn\/?p=90"},"modified":"2012-12-16T10:50:02","modified_gmt":"2012-12-16T10:50:02","slug":"redirect-magento-with-global-messages","status":"publish","type":"post","link":"http:\/\/ndthanh.com\/redirect-magento-with-global-messages\/","title":{"rendered":"Redirect Magento with global messages"},"content":{"rendered":"

Open the controller that contains your logic, put these lines at terminate point of your code:<\/p>\n

\n\nMage::getSingleton('core\/session')->addError('your message goes here');\n\n$this->_redirect('redirect location');\n\nreturn;\n\n<\/pre>\n

Above example will redirect and dispay an Error message, you can also display other type of message with the following methods from singleton Core\/session<\/p>\n