O'Reilly logo

Magento 1.4 Development Cookbook by Nurul Ferdous

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing the default module helper Data.php

This is the easiest recipe of this chapter! We need to create an empty class for our module.

How to do it...

  1. Create a new PHP file in the app/code/local/Packt/Socialwidget/Helper folder and name it as Data.php.
  2. Enter the following content and save this file:
    <?php
    /**
    * Packt Socialwidget Helper class
    *
    * @category Packt
    * @package Packt_Socialwidget
    * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
    */
    class Packt_Socialwidget_Helper_Data extends Mage_Core_Helper_Abstract
    {
    }
    

How it works...

Usually a helper class formats the data before rendering it to the screen. In this case, we just created an empty helper named as Packt_Socialwidget_Helper_Data and extended it with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required