0

I set Session variable for my array and I want to use on another page, but Nothing found in return. Like: (In My custom Module's Controller file) Here $datas is My array.

Mage::getSingleton('adminhtml/session')->setDatas($datas);

And Use :

$my_data = Mage::getSingleton('adminhtml/session')->getDatas();

echo"<pre>";print_r($my_data);

But not get anything. Please suggest what can I do.

0

I dont know this will work or not but you can try like this

Mage::getSingleton('adminhtml/session')->setData($datas);
$my_data = Mage::getSingleton('adminhtml/session')->getData();
print_r($my_data);

Use setData() and getData() instead of Datas

Please try and let me know

| improve this answer | |
0

Please use admin/session instead of adminhtml/session

$datas = 'Hello world';

Mage::getSingleton('admin/session')->setDatas($datas);

$my_data = Mage::getSingleton('admin/session')->getDatas();

echo"<pre>";print_r($my_data);
| improve this answer | |

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.