Create your first Magento 1.x module

This article will help you to build your first full functional Magento module.

Define the module

The first step is to define the module and the location of it in the code pool folder /app/etc/modules/<Namespace>_<Module>.xml

<?xml version="1.0"?>




Create Controller

Create the controller in the module folder under the “controllers” directory.

class <Namespace>_<Module>_IndexController extends Mage_Core_Controller_Front_Action
    public function indexAction()

Create Configuration XML


You have to define this file to configure and define all resources needed in the module.

You can define into the configuration XML file the routes, blocks, models, translations, and others as shown in the following example:

<?xml version="1.0"?>

X-debug installation and configuration

Find a few installation references

Few steps for having  x-debug working on your local environment or development:

  1. Download the proper xdebug extension, or you can use xdebug wizard for more information about the environment.
  2. An alternative is to install using pecl: pecl install xdebug
  3. Copy binary file to PHP’s extensions folder
  4. Link this binary file in php.ini using this command zend_extension=”/usr/local/php/modules/”
  5. Enable xdebug in php.ini and configure to listen remote connections
    xdebug.remote_port="<the port for XDebug to listen to>" (the default port is 9000)
    xdebug.remote_host=<the host where PhpStorm is running (e.g. localhost)>
    xdebug.profiler_output_dir="<AMP home\tmp>"
  6. You can check if xdebug is configured properly in PHP info.

Performance fix for EAV module

This module is a performance fix for all community and enterprise versions before 1.9.

Since I worked for a store having very complex products (with a large number of attributes and large scale of values), I discovered that Magento has a performance bottleneck on the product listing page and product page.

By having a closer look at the class Mage_Eav_Model_Entity_Attribute_Source_Table you can observe that getOptionText method use

 $options = $this->getAllOptions(false);

which is getting all records from the database and then filter them like this:

  foreach ($options as $item) {
            if ($item['value'] == $value) {
                return $item['label'];

This module will be useful for Magento shops with products with a large number of attributes or/and a large scale of values.

Download the module here

Simple carousel for Magento e-commerce

Purchase this extension for 75$ here

Manage your content in a simple way is possible with BB Simple Content Carousel.

Check the video for more details and the demo listed below.

  • Magento 1.9.1

User: bb_slider
Password: bb_slider123

  • Magento 1.8.1

User: bb_slider
Password: bb_slider123

Video tutorials