Magento Tutorials

Close the store for maintenance in Magento

Close the store for maintenance in Magento

During magento upgrade or transfer the store to another hosting or any changes, it is important to close the store for maintenance in Magento. If you need to close the magento store for maintenance, you need to do following: You can modify the default maintenance message with your own message. The template file is located at : errors\default\503.phtml Enable Maintenance mode in magento : To enable the maintenance mode in …

Continue reading

Change DOB Fields to Select Boxes in Magento

Change DOB Fields to Select Boxes in Magento

If you wants to change DOB fields to select boxes in magento this tutorial will help you. By default magento has input type boxes for enter DOB on registration form. So you can change these input boxes into dropdown boxes using below code. You can copy below code and replace in app\design\frontend\base\default\template\customer\widget\dob.phtml and add some CSS based on your theme. You need to include jQuery also on this page to …

Continue reading

Change Gender DropDown to Radio Button in Magento

Change Gender DropDown to Radio Button in Magento

If you want to change gender dropdown to radio button in magento this tutorial will help you. By default magento having a gender dropdown on registration page. On registration form magento uses widgets, you can see following lines on template register.phtml. So you can found gender widget template file on template\customer\widget folder. Now to change gender dropdown to radio button replace below code into the file. Hope this tutorial will …

Continue reading

Fatal error: Call to a member function toOptionArray() on a non-object

I have installed a new module then suddenly I got a fatal error in admin like Call to a member function toOptionArray() on a non-object in app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 46. To solve this issue go to app\code\core\Mage\Adminhtml\Block\System\Config\Form.php Now find the following on line 463 replace this with below code: Hope this tutorial will help you to solve the Fatal error: Call to a member function toOptionArray() on a non-object issue.

Change shipping rate based on shipping address in Magento

Change shipping rate based on shipping address in Magento

In this tutorial I will show you how to change shipping rate based on shipping address in Magento.  I have created a custom module to set the shipping rate based on shipping address country. I have added an observer on save shipping address after. I have added an event in config.xml of checkout. Below is the code of the observer of the event. Here you can set the shipping rate …

Continue reading

Flash Notification Messages in Magento

Flash Notification Messages in Magento

In this tutorial I will explain how to set flash notification messages in Magento. Flash message class and functions to display success, error, warning and notice message is inbuilt in Magento. For example when you submit the contact form and an error occurred below message will display. Now when you try again and successfully submitted then following message will display. The contact form module redirects the visitor back to the …

Continue reading

How to Skip Cart Page in Magento

How to Skip Cart Page in Magento

In this tutorial I will explain how you can skip cart page in Magento. If you want to go straight on checkout page on product add to cart button click, this tutorial will help you. Create a custom module and change in config.xml file and create an event. app/code/local/Yourmodule/Cart/etc/config.xml Now create a observer file and add below code. /app/code/local/Yourmodule/Cart/Model/Observer.php I hope this tutorial will help you to skip cart page …

Continue reading

How to Modify Magento TAX Calculation

How to Modify Magento TAX Calculation

In this tutorial I will explain how you can modify magento TAX calculation. Sometimes we need to modify the magento tax calculation according to your requirement for specific products or categories. To modify in Tax Calculation get a copy of the file code\core\Mage\Tax\Model\Calculation.php into community as app\code\community\Mage\Tax\Model\Calculation.php. Now find calcTaxAmount function on line no 600. Now change in this function as per your requirement and create a log table to …

Continue reading