by Bhumi // Jan 8,2013 // No comment
After few days,I am back again with my new quick article release. Today we will continue with Magento article series and i am going to explain how you can set, get and unset session into a magento.
It’s pretty simple, just you have to have an idea about it. First time When i wanted to set, i also think once is it difficult but no its quite simple in Magento
Let’s start with understanding it
|
1 2 |
Mage::getSingleton('core/session')->setVariableName('data'); |
|
1 2 |
$Data = Mage::getSingleton('core/session')->getVariableName(); |
|
1 2 |
Mage::getSingleton('core/session')->unsVariableName(); |
NOTE: Replace ‘VariableName’ with any desire text you want but ‘set’, ‘get’ and ‘uns’ prefixes are required.
That’s it.Now you have ‘set’, ‘get’ and ‘uns’ your session variables into Magento.
Thanks for reading and feel free to share your thoughts! Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.
Conquer SmartPhone Internet Era with Magento Mobile Themes
On looking at stressed faces of Magento users, it is easy to understand the reason of their stress. The impact of SmartPhone powered virtual era READ MORE
Magento Extension Admin Configuration
This is the next article of magento series and I am going to cover creation of basic custom payment option in admin panel.In Previous article,we READ MORE
Magento Extension Configuration
Magento is a powerful open source eCommerce solutions.Let’s move to the one step ahead in Magento article series.In this blog post, we will see how READ MORE
Enable system log and errors/warning in magento
Today I am going to start the series of the articles in Magento.No doubt Magento is a best open source e-commerce platform and whenever you READ MORE
To maintain session in WordPress
WordPress is stateless open-source content management system so WordPress does not use sessions.This means that session is not initialized automatically in wordpress.If you want to READ MORE
Be a Contributor at CreativeDev.Write an article or tutorial to the community and share some of your knowledge!