1 min read

How magento save value in session?

if you want to save “Test value” in “SessionMessage” variable

$sessionValue = ‘Test Value’;
Mage::getSingleton(‘core/session’)->setSessionMessage($inputMessage);

If you want to read value form “SessionMessage”

$outputMessage = Mage::getSingleton(‘core/session’)->getSessionMessage();
echo $this->__($outputMessage);

Share your Love

Leave a Reply

Your email address will not be published. Required fields are marked *