Home » Archive

Articles in the Magento Category

Magento »

[28 Mar 2011 | 4 Comments | 1,391 views]

Scenario I was creating a module. I already had one Grid displayed in admin. The Grid was being displayed by a Block class, for example: MyNamespace_MyModule_Block_Adminhtml_MyModule Now, I had to display another Grid using a new Block class. Let’s say, I created a new Block class: MyNamespace_MyModule_Block_Adminhtml_MyNewGrid I just copied code from MyNamespace_MyModule_Block_Adminhtml_MyModule and copied [...]

Magento »

[9 Mar 2011 | 4 Comments | 2,853 views]

Here is a quick code to get the admin user’s data (id, name, username, email, password, etc). By admin user, I mean the users that login through the admin panel and those who have access to the admin panel of Magento. The users can be administrator, or with some specific roles. $userArray = Mage::getSingleton(‘admin/session’)->getData();

Magento »

[3 Mar 2011 | 7 Comments | 9,498 views]

Problem: I transfered my Magento site files from one computer to another. I imported the database. Now, when I try to login to admin (when I go to admin login url), it shows 404 Not Found Error page. The same error is also displayed in the module’s page that are installed in site. However, the [...]

Javascript, jQuery, Magento »

[2 Mar 2011 | 4 Comments | 2,285 views]

By default, Magento contains and uses the Prototype javascript library. You can also integrate the other most popular javascript library ‘jQuery‘ in your Magento site. While integrating jQuery in Magento, you might get some javascript conflict and errors as you will be using two javascript libraries (prototype and jQuery) at a time. This is caused [...]

Magento »

[25 Feb 2011 | 2 Comments | 1,974 views]

Gift Message facility is present in Magento by default. You can add gift message in order as a whole or in individule order items. By default, the gift message is not enabled in Magento.

Magento »

[22 Feb 2011 | No Comment | 4,614 views]

Magento has this cool functionality of Event Observer. Magento follows the Observer Design Pattern for its event hooking system. With this Event Observer Hook, additional functionality can be added without modifying the core code. The full list of Magento Event Observer Hooks is present over here:- Magento Event/Observer Hooks Cheat Sheet

Magento »

[14 Feb 2011 | 2 Comments | 1,692 views]

Suppose you have a Magento shop installed. You also have another php installation in your server (may it be wordpress, joomla, drupal, or any other php code system). Now, you want to get Magento shop data in your external website which is not Magento. So, how to do this?

Magento »

[9 Feb 2011 | 4 Comments | 2,922 views]

Suppose you have a multi select attribute and you have displayed it in admin grid. You have displayed the multi select attribute options as selection list. Now, you want to filter/search the grid by the multiselect attribute. The problem here is that the multiselect attribute value is store as comma separated value in database. When [...]

Magento »

[30 Jan 2011 | 3 Comments | 1,224 views]

Here, I will be showing you how to get the top/highest rated product. The basic idea for getting the top rated products is fetching all products, looping through them, getting ratings of each product and populating a ratings array. After that sort the array and then slice the array for limiting the number of product [...]

Magento, Miscellaneous »

[4 Jan 2011 | 14 Comments | 5,430 views]

Here is a list of sample/dummy/test credit card numbers, which are safe to use when you test credit card functionality on a website or application that involves credit card transactions. These credit card numbers validate properly but they are not actually in use. American Express:

Magento »

[31 Dec 2010 | 8 Comments | 3,090 views]

Here is a quick solution to the problem of upsell, cross sell and related products not showing up in Magento shop frontend. This problem occurs in Magento version 1.4 or higher. Scenario:

Magento »

[23 Dec 2010 | 2 Comments | 3,872 views]

Here, I will show you how you can filter or fetch products related to any particular attribute and value. A simple scenario will be filtering products by manufacturer/brand. Suppose, I want to get all products under ‘Samsung’ manufacturer/brand.

Magento »

[10 Dec 2010 | No Comment | 1,096 views]

In your Magento shop URL, if you see “index.php” and wanted to remove it then here is the solution. – First of all, apache module ‘mod_rewrite‘ should be enabled. Check apache’s httpd.conf file this. – Then login to Magento admin panel – Go to System -> Configuration -> Web -> Search Engines Optimization -> Use [...]

Magento »

[6 Dec 2010 | No Comment | 779 views]

Scenario: I have changed my product’s Visibility to ‘Nowhere‘. But still the product is visible in both catalog and search. I have refreshed cache but the problem is still there. Cause:

Magento »

[1 Dec 2010 | One Comment | 2,169 views]

Maintenance mode is a key feature required to any website. You need to set the live website into maintenance mode whenever you need to do any changes in the website. Here, I will show how you can do this in Magento. For Magento version 1.4 and above, you just need to create a file named [...]