Currently browsing

Magento: Upgrading mysql setup of a module

Suppose, you have a module called MyModule. Its version is 0.1.0. Now, you want to do some database changes for the module. You have the mysql setup file (mysql install file) mysql4-install-0.1.0.php in MyModule/sql/mymodule_setup folder of your module. You don’t need to make direct changes to database. You can upgrade your module to make …

Magento: How to get attribute name and value?

Attribute in Magento is like a property. All Products, Categories, Orders, Customers, etc. have attributes. For example, the attribute of a product is its name, sku, description, image, etc. This article will show you how to get attribute name and value for any product. The following code is about getting …

Magento: How to delete System Attribute?

Suppose, you want to delete an attribute. But there is no delete option while you edit the attribute. This means that the attribute is system attribute. System attributes cannot be deleted. Only user defined attributes can be deleted. To delete the attribute, you have to make it user defined. – …

Magento: Get Set Unset Session

Set a custom 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(); (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:- Mage::getSingleton(‘adminhtml/session’) Looking for improvement for …

Configuration error on new Magento installation

Scenario: I am installing a fresh magento 1.3.2.1 in my Windows XP computer. I have Xampp installed. While installing magento, I had a problem at the configuration step where I had to fill database host, username, password etc. When I click continue after filling the required fields, the installation process …