我试图在subscribe.phtml
文件中显示简报的成功消息,我认为这应该是非常简单但不是......
代码如下:
`<?php echo $this->getChildHtml('global_messages') ?>`
和
<?php // Getting Messages from Session
$messages=$messages=Mage::getSingleton("core/session")->getMessages();
echo $this->getLayout()->createBlock("core/messages")->setMessages($messages)->getGroupedHtml();?>
似乎不起作用。对此有何建议?
干杯, 禽
答案 0 :(得分:3)
查看/app/code/core/Mage/Newsletter/controllers/SubscriberController.php
有一条这样的行,它会被执行:
else {
$session->addSuccess($this->__('Thank you for your subscription.'));
}
我文件中的第68行。
这也可以在/app/locale/en_US/Mage_Newsletter.csv
文件以及您希望支持的任何其他语言中进行编辑。
更改"Thank you for your subscription.","Thank you for your subscription."
到
"Thank you for your subscription.","This will be my new message, that I wish to display to users, after subscribing."
或
"Thank you for your subscription.",""
此处不显示任何内容。