Magento: Check if a module is installed, enabled or active

Here is a quick code to check if a Magento module is installed, enabled or active. The functions isModuleEnabled and isModuleOutputEnabled are present in Mage_Core_Helper_Abstract class. $moduleName = 'Mage_Core'; // edit to your required module name if (Mage::helper('core')->isModuleEnabled($moduleName)) { echo "Module is enabled."; } else { echo "Module is disabled."; } You can also check … Read more

Magento: How to create extension package? [IMAGES]

You have built a custom magento extension (magento module) and you want to package it and submit it to magento connect (magento extension directory). This article shows how to create Magento extension package. I have included images for every step which I followed while creating extension package for my module (Auto Currency Switcher). Auto Currency … Read more

Magento: Access denied in admin of custom module

I was building a custom module in Magento. I had created a system.xml file for storing configuration data from admin. From the below system.xml file, you can see that I have created a section named ‘My Module Name‘ which can be accessed from Admin –> System –> Configuration. In the file below, I have just … Read more

Magento: Set title, keywords and description in your module

Suppose, you have created a new module or you have an existing module. You have a frontend page for your module. You want to set or change title, keywords, and/or description of your module page. Well, you can do so by adding few lines of code in layout xml file of your module. The layout … Read more

Magento: How to get controller, module, action and router name?

You can easily get controller name, action name, router name and module name in any template file or class file. IN TEMPLATE FILES $this->getRequest() can be used in template (phtml) files. Here is the code: /** * get Controller name */ $this->getRequest()->getControllerName(); /** * get Action name, i.e. the function inside the controller */ $this->getRequest()->getActionName(); … Read more