1

I'm developing a module in Magento 1.9. My module has form and to submit the form, the user needs to log in. After login, I wanna get data of the form which user submit before login.
I set:

Mage::getSingleton('module/session')->setFormData()    

I get:

Mage::getSingleton('module/session')->getFormData()    

But when I debug, after customer login, I get form data is null.
How can I set form data like above?

  • have u tried with 'core/session' – Amit Bera Feb 22 '17 at 8:47
2

Use below code for it:

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

You can retrieve data using below code:

Mage::getSingleton('core/session')->getFormData(); 
  • Thank you, but with: Mage::getSingleton('core/session')->setFormData() ; and Mage::getSingleton('core/session')->getFormData() ; and now it work fine for me. – Coder No 21 Feb 23 '17 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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