错误消息不会显示在magento的自定义注册表单phtml页面上

时间:2012-11-30 12:06:07

标签: magento

我目前正致力于管理magento用户的三种类型(普通用户,作者,编辑)。

我需要为作者和编辑创建单独的注册表单。但是,使用createpost action中的单个Accountcontroller.php保存了所有用户。

作者的注册表在authorregister.phtml中,除错误消息外,每件事情都正常。

表单错误消息未显示在authorregister.phtml文件中。 然后我在块$this->getMessagesBlock()->getGroupedHtml();之后,即使在那之后也没有显示错误消息。

To My Surprise这些错误消息正在persistent/customer/form/register.phtml页面上显示。

我无法找到为什么在该页面加载时显示此表单错误消息的问题。

任何人都可以帮助我。

1 个答案:

答案 0 :(得分:0)

您好以下提示可能对您有帮助.....

authorregister.phtml添加第一行

< div id="messages_product_view"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?>< /div>

 In Accountcontroller.php before redirect 
Mage::getSingleton('core/session')->addSuccess(Mage::helper('modulename')->__('Thank you .'));