Magento 1.4: No products displayed in category listing

Scenario: I have a fresh installation of Magento 1.4. I already have installed the sample data for Magento. Now, when I go to the category listing page, no products are displayed. It says “There are no products matching the selection.“. By category listing page, I mean the product listing page displayed when any category is … Read more

Magento: How to change Currency symbol by Model Override ?

In my previous article, I had written about how you can change the currency symbol by making some change in the Zend (lib/Zend/Locale/Data/en.xml) file. It’s easy way but the main drawback of this method is that all your changes will vanish once you upgrade Magento. A better way will be overriding Magento model classes that … Read more

Magento: How to get all associated children product of a configurable product?

A configurable product can have multiple other products associated to it. This article shows how to fetch all the children products that are associated with a configurable product. Here is the code: /** * Load product by product id */ $product = Mage::getModel('catalog/product') ->load(YOUR_PRODUCT_ID); /** * Get child products id (only ids) */ $childIds = … Read more

Magento: How to change Currency symbol ?

I had to change the currency symbol of Nepalese Rupee (from Nrs to Rs). By default, the currency symbol for Nepalese Rupee is Nrs. For this, you need to edit lib/Zend/Locale/Data/en.xml Well, the xml file to edit depends upon your locale settings. My locale is set to English (United States). So, I will have to … Read more

Magento: How to get Currency Rates?

You can see the currency Rates from Magento Admin System -> Manage Currency Rates You can change base currency and allowed currencies from System -> Configuration -> GENERAL -> Currency Setup -> Currency Options Now, here I will show you how you can get currency rates values for any given currency code. Here, I will … Read more

Magento: How to change order status programmatically?

This article shows how to change your order status programmatically in Magento. First, you need to load your order. You can load order by either order_id or order_increment_id. Load order by “order id” $orderId = YOUR_ORDER_ID; $order = Mage::getModel('sales/order')->load($orderId); Load order by “order increment id” $orderIncrementId = YOUR_ORDER_INCREMENT_ID; $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId); Change order status to … Read more

Magento Error – Notice: Undefined index: 0 app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92

I got this error message when migrating my Magento files and database from one server to another. Notice: Undefined index: 0 in app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92 Solution: – Open PhpMyAdmin – Go to your database – Click SQL – Run the following SQL Query: SET FOREIGN_KEY_CHECKS=0; UPDATE `core_store` SET store_id = 0 WHERE code='admin'; UPDATE … Read more

Magento: There has been an error processing your request. Exception printing is disabled by default for security reasons

Problem: I am using Magento 1.4. Homepage loads fine. When I go to category (product listing) page, it works fine. But when I go to any product detail page, I get the following error:- There has been an error processing your request Exception printing is disabled by default for security reasons. I don’t get the … Read more

Magento: Rewrite/Override Block Controller Model Helper

This article will show how you can override/rewrite Magento Block, Controller, Model and Helper files. We will be dealing with the config XML files and the class files to override. We override Magento core classes to update/modify the core functionalities according to our need. We can directly makes changes in the core Magento classes but … Read more