Magento »

[1 May 2011 | 3 Comments]

This article shows how to add default value to any system configuration option fields. System configuration option fields means those options under System -> Configuration.
Suppose, you have the following system.xml file. System.xml file is necessary to add admin configuration options.

Magento »

[29 Apr 2011 | One Comment]

Scenario:-
I am getting the fatal error saying:-
Fatal error: Call to a member function getTable() on a non-object in /var/www/magento/app/code/core/Mage/Core/Model/Mysql4/Collection/Abstract.php on line 456
This error occurs when I try to browse Configurable product in frontend. Or, when I try to add Configurable product in backend.

Magento »

[25 Apr 2011 | 25 Comments]

Here, I will show you how you can get information about all items in your Magento Shopping Cart. You will see how you can :-
– Get products id, name, price, quantity, etc. present in your cart.
– Get number of items in cart and total quantity in cart.
– Get base total price and grand total price of items in cart.

Magento »

[18 Apr 2011 | 5 Comments]

Here, I will show you how to track visitor’s data information in Magento. By visitor’s information, I mean information like remote address, http host, user agent (browser), referer url, first visit date time, last visit date time, etc.
The following code fetches the vistor data:-

Magento »

[11 Apr 2011 | 5 Comments]

I created a module, let’s say, ‘MyModule’. When I go to the Admin -> System -> Configuration section of this module, I get this weird error.

Fatal error: Class ‘Mage_MyModule_Helper_Data’ not found

Magento »

[4 Apr 2011 | 8 Comments]

Case:
Here, I am taking the scenario of a custom Magento module. You are developing a custom Magento module and you don’t want to show the ‘Add New’ button in the Grid. The Add New button is present in top right corner of Grid Page.
Rename ‘Add New’ button

Magento »

[28 Mar 2011 | 11 Comments]

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 it to MyNamespace_MyModule_Block_Adminhtml_MyNewGrid class.

PHP, Review »

[21 Mar 2011 | 3 Comments]

The ionCube PHP Encoder makes it easy to protect your PHP 4 & 5 source code, including sources using the PHP 5.3 language, from easy observation, theft and change. Encoded files run on a wide range of operating systems such as Linux, Windows, FreeBSD and others.
Introduction: http://www.ioncube.com/sa_encoder.php

Google »

[14 Mar 2011 | 2 Comments]

You can use multiple email addresses with your single Gmail account.
Trick #1
Suppose, you have your Gmail account as: firstname.lastname@gmail.com
With Gmail, you can also use it as: firstnamelastname@gmail.com or first.name.lastname@gmail.com or first.name.last.name@gmail.com