I want to set data session when customer is not log in and if this customer logged in i want to retrive this data and i NEED to do it in observer. I used already for example this events to get data:
customer_login
controller_response_redirect
controller_action_predispatch
And for all of them my session data was cleared after logged in.
I set data like this:
$url = Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::helper('core/url')->getCurrentUrl(), array('_secure' => true));
$test = Mage::getSingleton('customer/session')->setData('test', 'cos tam');
$test123 = Mage::getSingleton('core/session')->setData('test123', 'cos tam12345');
And try to get like this:
$url = Mage::getSingleton('customer/session')->getBeforeAuthUrl();
$test = Mage::getSingleton('customer/session')->getData('test');
$test123 = Mage::getSingleton('core/session')->getData('test123');
How should i store this session or/and what event should i use?