I am beginner in Magento. So may be this is not right question that magento supports this functionality or not. I am building a website structure with help of magento and codeigneiter on same environment. My requirement is get session details of magento in my framework so this is possible or not with magento + customization framework script.
Asked
Active
Viewed 81 times
-1
-
2php session is same for everything. you can make some wrapper function that will parse $_SESSION vars and returns values that you need. – pregmatch Oct 20 '15 at 10:40
-
I am not getting magento session by $_SESSION in my php function. I am also login from magento admin. – Ritesh Oct 20 '15 at 10:48
1 Answers
0
Magento session is handled by the session class. set new variable and value in the session.
Mage::getSingleton("core/session")->setYourVariableName("your value here");
// set your own session variable name in CamelCase.
//eg. you want to set author_name variable than use setAuthorName("value here")
I suggest you to go through refrence: https://ellislab.com/codeigniter/user-guide/libraries/sessions.html and study about it well before paying with this.

Navnish Bhardwaj
- 1,687
- 25
- 39
-
-
Then how your Magento site is working, if you are not getting values in php code. – Navnish Bhardwaj Oct 20 '15 at 10:52
-
My php file is seperate by magento setup. In that file i want magento session variables also but this is not coming as i used print_r($_SESSION); not providing any thing. – Ritesh Oct 20 '15 at 10:57
-
This issue can take place due to privilege issues outside directory too. Check you .htaccess file for confirmation why you are not able to read session values outer php codes – Navnish Bhardwaj Oct 20 '15 at 11:02
-
-
Yes the root directory will be having .htaccess file, where Magento is installed. Check is there any denies to access outside – Navnish Bhardwaj Oct 20 '15 at 11:42
-
-
I think so, he is using different directory areas or even different domains. – Navnish Bhardwaj Oct 20 '15 at 14:13