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: Show CMS Static Block on only one specified Category page

Sometimes we might need to show a single static block in one or few specified categories only, rather than showing the static block on all pages. The layout XML code below helps to achieve the above requirement. It will show the static block ‘my-sidebar-1′ on right sidebar of category with id ’10’. Similarly, static block … Read more

Eclipse: Could not load the Tomcat server configuration at \Servers\Tomcat v7.0 Server at localhost-config

I followed the article of installing Eclipse Web Tool Platform (WTP) from these two links: Servlet and JSP development with Eclipse WTP Setup Eclipse and Tomcat 7 on Linux Now, while running my project in Eclipse, I get the following error message: Could not load the Tomcat server configuration at \Servers\Tomcat v7.0 Server at localhost-config … Read more

Eclipse JSP: java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 51.0

My JSP project was running fine on Eclipse. However, I got the following error when I tried to add some value to database through my project data insert form. org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 51.0 After googling about the error, I found out that there was mismatch in the JVM version that … Read more

Tomcat Eclipse Error: Multiple contexts having same path

I got the following error while working on a JSP project on Eclipse IDE. I have been using Tomcat server version 7. Here is the error message: ‘Publishing to Tomcat v7.0 Server at localhost…’ has encountered a problem. Could not publish server configuration for Tomcat v7.0 Server at localhost. Multiple Contexts have a path of … Read more

Tomcat Eclipse Error: Starting Tomcat v7.0 Server at localhost has encountered a problem

I have been using Tomcat server version 7. I get the following error message when I try to run the JSP application from Eclipse IDE. Starting Tomcat v7.0 Server at localhost has encountered a problem. Several ports (8005, 8080) required by Tomcat v7.0 Server at localhost are already in use. The server may already be … Read more

Magento: Orders made using Paypal are not dispalyed in Customer’s ‘My Orders’ section

Problem: I placed an order in Magento using Paypal payment method. Everything went fine. I was able to pay through Paypal. However, when I login to the shop as a customer, I see that ‘My Orders‘ section is empty. I could not find information of the order I recently placed. Cause: Your order status might … Read more

Magento: Create your own custom Event Observer

Event-Observer methodology is a very helpful way for customizing Magento. It’s an alternative to overriding Magento core classes/methods. Magento has raised event at many useful places. However, there can be a situation where there is no event present in any particular method/function and we want an event to be raised there. Moreover, some events that … Read more