简体   繁体   English

magento将会话消息添加到cms页面

[英]magento add session messages to cms page

In my Magento site I have a custom signup form and a CMS thank-you page that the user is redirected to after they complete the form. 在我的Magento网站中,我有一个自定义的注册表单和一个CMS感谢页面,用户在填写表单后会将其重定向到该页面。 Is there a way to include the session messages in the CMS page? 有没有办法将会话消息包含在CMS页面中?

I've tried playing w/ the Layout Update XML field, but I'm not getting anywhere 我尝试过使用“ 布局更新XML”字段,但是我什么都没得到

Here is what I've tried so far, all w/ no luck. 到目前为止,这是我尝试过的一切,没有运气。

<block type="core/messages" name="global_messages" as="gloabl_messages" />
<block type="core/messages"  name="messages" as="global_messages" />

{{block type="core/messages" name="global_messages" as="gloabl_messages" }}
{{block type="core/messages"  name="messages" as="global_messages" }}

Try: 尝试:

<block type="core/messages" name="global_messages" as="global_messages"/>
<block type="core/messages" name="messages" as="messages"/>

That should display any messages in the core/session class. 那应该显示核心/会话类中的所有消息。 Make sure the messages are being set on the core session. 确保在核心会话上设置了消息。 It is possible they are being set on the customer session. 有可能在客户会话中设置它们。 Mage::getSingleton('core/session') gets the core session. Mage :: getSingleton('core / session')获取核心会话。 Mage::getSingleton('customer/session') gets the customer session, etc. Mage :: getSingleton('customer / session')获取客户会话,依此类推。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM