Header Ad

Showing posts with label Error Messages in Magento. Show all posts
Showing posts with label Error Messages in Magento. 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();
}