Book Image

Magento 1.4 Development Cookbook

By : Nurul Ferdous
Book Image

Magento 1.4 Development Cookbook

By: Nurul Ferdous

Overview of this book

<p>Magento is the fastest growing PHP-based e-commerce solution based on the Zend Framework. It is a robust CMS that provides developers the ability to enrich their store with extra functionalities using custom modules. Developing a Magento store to get the desired look and feel is not as easy as you might believe and may take hours due to the wealth of features available for you to use.<br /><br />Magento 1.4 Development Cookbook provides unparalleled guidelines to develop a much faster and more captivating Magento store by writing powerful custom modules. The book covers everything from common development tasks to integrating social networking plugins into Magento.<br /><br />If you choose to work through all the recipes from the beginning, you will have a development platform ready to work with Magento. You will also explore different ways to customize the look and feel of a Magento store to offer your customers a better user experience. Integration of Magento with WordPress to add striking functionality to your store will be accomplished in just a few steps. Some cool recipes take care of the Magento security measures by editing the parameters in the admin panel. Setting up a master-slave setup for Magento database is discussed along with other database optimizations in the database chapter. Developing new modules and widgets for Magento is thoroughly described. Optimizing Magento's performance is the most important part of this book, which is armed with some easy and incredible recipes dealing with YSlow, Page Speed, Siege, Apache bench, Apache configuration, php.ini optimization, and caching with APC or Memcached. The work procedure behind the wall is explained in an easy manner so that both novice and experienced developers can benefit from it. This book also has some recipes that are not only useful for Magento but also for any other LAMP-based project.</p>
Table of Contents (19 chapters)
Magento 1.4 Development Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Activating a module


Activating or deactivating a module in Magento is handled by an XML file. In this recipe, we will activate our News module by specifying it in an XML file named Packt_News.xml.

How to do it...

  1. Create a new XML file named INTERFACE_MODULE in the app/etc/modules directory. In my case, this is Packt_News.xml.

  2. If you already have this file, there is no need to create a new one. Just replace the existing code with the following code snippet:

    <?xml version="1.0"?>
    <config>
      <modules>
        <Packt_News>
          <active>true</active>
          <codePool>local</codePool>
        </Packt_News>
      </modules>
    </config>
  3. Save this file and exit.

How it works...

Magento depends heavily on XML file configurations. For our new module, we had to tell Magento to activate News module from the package Packt. And the codepool for our News module resides in the app/code/local directory. We wrote it in an XML file as Magento can interpret it.