Php 消息块不适用于(客户/会话)Magento
我在写控制器Php 消息块不适用于(客户/会话)Magento,php,magento,Php,Magento,我在写控制器 Mage::getSingleton('customer/session')->addSuccess($hlp->__('Vendor registered successfully.')); 在我的phtml页面中 echo $this->getMessagesBlock()->getGroupedHtml() 但是它没有显示成功消息。echo$this->getMessagesBlock()默认情况下返回核心/会话的消息,如您在\Mage\u核心\模
Mage::getSingleton('customer/session')->addSuccess($hlp->__('Vendor registered successfully.'));
在我的phtml页面中
echo $this->getMessagesBlock()->getGroupedHtml()
但是它没有显示成功消息。echo$this->getMessagesBlock()默认情况下返回
核心/会话的消息,如您在\Mage\u核心\模型\布局::getMessagesBlock
中看到的
尝试使用$this->\u initLayoutMessages('customer/session')在控制器中$this->loadLayout()
之后和$this->renderLayout()之前的代码>