Category: magento tips

Add success or error message using magento session

Error message Set error message for front page. $message = $this->__(‘Got an error’);Mage::getSingleton(‘core/session’)->addError($message); Set error message for admin page. $message = $this->__(‘Got an error’);Mage::getSingleton(‘adminhtml/session’)->addError($message); Success message Set success message for front page. $message = $this->__(‘Got an error’);Mage::getSingleton(‘core/session’)->addSuccess($message); Set success message for admin page. $message = $this->__(‘Got an error’);Mage::getSingleton(‘adminhtml/session’)->addSuccess($message); If you are unable to view the […]

Read Moreā€¦