Magento: Get Set Unset Session

Here are code to Get, Set, and Unset Session in Magento. Set session with variable Name ‘testing_magento‘. The session value here is ‘hello‘. Mage::getSingleton(‘core/session’)->setTestingMagento(‘hello’); Get session ‘testing_magento’ $test = Mage::getSingleton(‘core/session’)->getTestingMagento(); Unset session Mage::getSingleton(‘core/session’)->setTestingMagento(); Note: Use customer or core session in frontend. Use adminhtml session in the backend. Core Session:- Mage::getSingleton(‘core/session’) Customer Session:- Mage::getSingleton(‘customer/session’) Admin Session:- … Read more

Javascript: Add Remove HTML elements

You can add html elements dynamically with Javascript. In this article, I will show you how to do so. I have created two Javascript functions. One for creating html elements and the other for removing them. In my html elements, I have created ‘li’ and ‘strong’ elements inside ‘div’. The div id is ‘summary’. I … Read more

PHP : Read Write XML with DOMDocument

In this article, I will be showing you how to create and read xml document with php’s DOMDocument. The DOM extension allows you to operate on XML documents through the DOM API with PHP 5. Below is the code to create XML file. I have named the output file ‘example.xml’. For better understanding, I have … Read more

PHP Javascript : Playing with multi-dimensional array

I had to work on multi-dimensional array with javascript and php. I had a multi-dimensional array in php. I had to load it into javascript array and then populate the html selection list. The challenge for me was to create multi-dimensional array in javascript and populate selection list with for loop in javascript. Here is … Read more

PHP : Read Write XML with SimpleXML

In this article, I will be showing you how to create and read xml document with php’s SimpleXML extension. The SimpleXML extension provides a very simple and easily usable toolset to convert XML to an object that can be processed with normal property selectors and array iterators. Below is the code to create XML file. … Read more

JoomlaPack – Simply the best backup component for Joomla!

I used JoomlaPack for backing up my Joomla! CMS site and I cannot stop writing about it. It’s simple, easy to use, quick, efficient and moreover it’s FREE. It creates a full backup of your site in a single archive. The archive contains all the files, a sql file with database script and a restoration … Read more

How to Install Sample Data for Magento?

Remember that, Sample Data must be installed prior to the basic Magento Installation. But never mind if you forgot to install sample data before installing Magento. Here, I will show you how you can install sample data after you have installed Magento. 1) Download Sample Data zip file from Magento Website 2) Extract the zip … Read more