Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/289.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 消息块不适用于(客户/会话)Magento_Php_Magento - Fatal编程技术网

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()之前的代码>