Maniprakash Chinnasamy
Maniprakash Chinnasamy

Reputation: 2776

How to Unset Magento Error Message Session?

I need to unset the error message session in magento for below code.

Mage::getSingleton('core/session')->addError($message);

Can any one help me?

Upvotes: 6

Views: 9661

Answers (1)

Menno
Menno

Reputation: 641

You should be able to use the following code, though it will return all messages (it will not echo them), it will clear them:

Mage::getSingleton('core/session')->getMessages(true); // The true is for clearing them after loading them

I hope this answers your question. ^_^

Upvotes: 21

Related Questions