Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 magento 中为以下代码取消设置错误消息会话。
Mage::getSingleton('core/session')->addError($message);
谁能帮我?
您应该能够使用以下代码,尽管它会返回所有消息(它不会回显它们),但它会清除它们:
Mage::getSingleton('core/session')->getMessages(true); // The true is for clearing them after loading them
我希望这回答了你的问题。^_^