我已在客户登录页面打印SESSION,我想知道如何从magento中的会话对象打印错误/成功消息
lastAddedMessage
答案 0 :(得分:0)
您只需要在重定向到某个网址之前从某个控制器操作传递您的消息,并且当网页登陆时它会显示
Mage::getSingleton('customer/session')->addSuccess('My Message');
Mage::getSingleton('customer/session')->addError('My Message');
$this->_redirect('customer/account/index');
OR
Mage::getSingleton('core/session')->addSuccess('My Message');
Mage::getSingleton('core/session')->addError('My Message');
$this->_redirect('mymodule/mycontroller/myaction');