B-219 Sec-55 Noida, India

How to show add Success message and add Error message in Magento

This is one of the easiest way to show Either Error message or Success message in magento for one time.If you are thinking to show an error message or success message one time when a page load then it is the best method to use in mganeto.

Show Error Message in frontend
$message = $this->__(‘Email Id Already Exist.’);

Show Success message in frontend
$message = $this->__(‘You have Register Successfully’);

If you wish show Success message or Error Message in Admin html then you need to write your code little bit different

Show Error Message in Admin page
$message = $this->__(‘1 row has been updated successfully’);

Show Success Message in Admin page
$message = $this->__(‘Email Id Already Exist.’);

(Visited 57 times, 1 visits today)

Leave a reply

You must be logged in to post a comment.