Show Error Message in frontend

$message = $this->__(‘Email Id Already Exist.’);
Mage::getSingleton(‘core/session’)->addError($message);
Show Success message in frontend

$message = $this->__(‘You have Register Successfully’);
Mage::getSingleton(‘core/session’)->addSuccess($message);


Show Error Message in Admin page

$message = $this->__(‘1 row has been updated successfully’);
Mage::getSingleton(‘adminhtml/session’)->addSuccess($message);
Show Success Message in Admin page

$message = $this->__(‘Email Id Already Exist.’);
Mage::getSingleton(adminhtml/session’)->addError($message);

By admin

2 thoughts on “How to show add Success message and add Error message in Magento”

Leave a Reply

Your email address will not be published. Required fields are marked *