Header Ad

Showing posts with label Magento Error Messages. Show all posts
Showing posts with label Magento Error Messages. Show all posts

Saturday, April 3, 2010

Ability to get error messages in Magento

The following code will be helpful to get error messages in magento.

$mm = Mage::getSingleton('checkout/session');

foreach ($mm->getData('messages')->getErrors() as $item){
echo $item->getCode();
}