Create first Magento 1.x module

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

Define the module

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

 

Create Controller

/app/code/local/<Namespace>/<Module>/controllers/IndexController.php
Create the controller in the module folder under the controllers directory.

Controllers (the classes under under the controllers folder ) are not auto loaded in Magento, so you have to include the extended class manually.

Create Configuration XML

/app/code/local/<Namespace>/<Module>/etc/config.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:

 

X-debug installation and configuration

Find few installation references

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

  1. Download the proper xdebug extension http://xdebug.org/download.php, or you can use xdebug wizard http://xdebug.org/wizard.php for more information about environement.
  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/xdebug.so”
  5. Enable xdebug in php.ini and configure to listen remote conections
  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 Community 1.9 edition.

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

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

for getting all records in database and then filter them like this:

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

Download the module here https://github.com/georgebabarus/mage-eav-option-performance-fix

Simple carousel for Magento e-commerce

Purchase this extension for 75$ here  http://shop.babarus.ro/simple-carousel-content-products-and-banners.html

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

Fronted: http://slider.mage19.demo.babarus.ro
Admin: http://mage19.demo.babarus.ro/index.php/admin
User: bb_slider
Password: bb_slider123

  • Magento 1.8.1

Fronted: http://slider.mage18.demo.babarus.ro
Admin: http://mage18.demo.babarus.ro/index.php/admin
User: bb_slider
Password: bb_slider123

Video tutorials

 Product carousel

Day by day any web shop needs is to group products and place them on the frontend in a fancy user interface.