Header Ad

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();
}

No comments: