Magento 1.9 Session – Fix Can’t Get Session Variable Before _redirectSuccess

magento-1.9session

in rewrite customer controller, in session, custom var 'email' is set:

if(!empty($customer_data)){

    $session = Mage::getSingleton('core/session', array('name' => 'frontend'));
    // or $session = $this->_getSession();
    $session->setEmail($email);
    // or  $email   = $session->setData('email', $email);
    Mage::getSingleton(‘core/session’)->setMySessionVariable($email); 
    $this->_redirectSuccess($this->_getUrl('*/*/customerChoice/'));

    ...

    }

then, on other customer controller's action, in which i redirect from the code above, i do:

public function customerChoiceAction()
{
    $session = Mage::getSingleton('core/session', array('name' => 'frontend'));
    // or $session = $this->_getSession();

    $email   = $session->getEmail();
    // or  $email   = $session->getData('email');

but i get null in result, where to dig and hove to solve? thanks!

UPDATE

THIS WAS ONLY GOOGLE CHROME ISSUE, IN FIREFOX EVERYTHIG IS OK

Best Answer

Please try bellow code:

Data set in session

Mage::getSingleton('core/session')->setAbcemail('xyz@gmail.com');

Data get in session

Mage::getSingleton('core/session')->getAbcemail();
Related Topic