0

For some reason, Magento clears session or customer session data after redirect? How will I save some data before it redirect to the next page into a session?

I tried adding session_write_close(); but this doesn't help.

I'm using Magento::getSingleton('core/session')->setVar('something'); and retrieve it after redirect but it's returning null.

Thank you.

1
  • How you are trying to retrieve from session? Provide that line of code. Feb 3, 2015 at 9:54

1 Answer 1

0

You can set the session using :

Mage::getSingleton('core/session')->setVar('something');

and retrieve it using :

$yourSessionVariableValue = Mage::getSingleton('core/session')->getVar();

Also if you are using caching layers like FPC (Lesti Full page cache module), you need to specify the session variables in backend system->configuration->system

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.