我目前正致力于管理magento用户的三种类型(普通用户,作者,编辑)。
我需要为作者和编辑创建单独的注册表单。但是,使用createpost action
中的单个Accountcontroller.php
保存了所有用户。
作者的注册表在authorregister.phtml中,除错误消息外,每件事情都正常。
表单错误消息未显示在authorregister.phtml文件中。
然后我在块$this->getMessagesBlock()->getGroupedHtml();
之后,即使在那之后也没有显示错误消息。
To My Surprise这些错误消息正在persistent/customer/form/register.phtml
页面上显示。
我无法找到为什么在该页面加载时显示此表单错误消息的问题。
任何人都可以帮助我。
答案 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 .'));