This article will assume that you have already set up the cron.sh or cron.php file on your server’s crontab and is successfully running.
By default Magento has a list of cron jobs that execute at certain frequencies. Examples would be Magento’s Google sitemap generation, or cleaning up log files. If you haven’t done so, it ...
This article will demonstrate how to add a Magento observer where you have the ability to hook onto an in-built Magento event or onto a custom event of your own.
If you haven’t already read the Magento Dispatch Event article, it would be a good idea to familiarise yourself with Magento’s Event Driven Architecture.
When Magento dispatches an event, observers can execute code by listening to these events. There are a lot of references to the Magento dispatch event method within Magento. An example of how this might look can be seen below.
We can look at this method in more depth by navigation to the Mage.php class.
Take ...
This article will demonstrate how to add a frontend Magento custom block, model, helper and controller. For the purpose of this article, we will ensure that our module will be accessible via the somemodule/index/index route.
On this page we will also add a custom block and template that will return some data from the ...
Magento makes use of PHP 5’s autoloading feature to include classes. One of the more irritating aspects of a large application is including class files at the top of each script every time you create a new class. Autoloading eliminates this problem. This article represents how Magento uses its Varien_Autoload class.
Firstly, Magento sets its ...
There are two types of Magento promotions that you can use for customers that are configurable in the admin: Catalog Price Rules and Shopping Cart Price Rules. To configure these rules, Magento provides a Promotions tab in the admin you can navigate to.
Catalog Price Rules
Catalog price rules enable the merchant to specify rules ...
An overview of the Magento order workflow can be described by viewing the following steps below.
1. The customer places an order through the checkout, receives a confirmation email and a link to their account (if they registered). A record of the order gets saved within the Magento admin under Sales -> Orders.
2. Before ...
Magento adminhtml.xml files are files that contain information about the menu items in Magento admin area. Magento loads the configuration within these files in the __construct() method of the Mage_Admin_Model_Config class.
The key line is where loadModulesConfiguration() is called.
The loadModulesConfiguration() method is also used to load Magento’s config.xml and system.xml files.
So we can ...
The Magento system.xml files are files that contain configuration information about Magento’s System -> Configuration area. They are located in the same directory as the modules’ config.xml configuration file: in the modules’ etc directory.
So how does the Magento system.xml file get loaded? This controller responsible for loading the System -> Configuration area belongs in ...
Following on from our Custom Grid guide, we can now start adding a Magento admin custom form, where we’ll be able to add, edit and remove data.
We saw previously that Magento grids extend the Mage_Adminhtml_Block_Widget_Grid_Container and Mage_Adminhtml_Block_Widget_Grid classes.
Magento forms extend the Mage_Adminhtml_Block_Widget_Form_Container and Mage_Adminhtml_Block_Widget_Form classes.
So we’re looking to add two ...