简讯中的Magento全球信息

时间:2012-01-26 12:11:04

标签: magento

我试图在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();?> 

似乎不起作用。对此有何建议?

干杯, 禽

1 个答案:

答案 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.",""

此处不显示任何内容。