Ads

Wednesday, 11 September 2013

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);

No comments:

Post a Comment