PacktLib: Magento 1.8 Development Cookbook

Magento 1.8 Development Cookbook


About the Author

About the Reviewers


Getting Started with Magento


Preparing the development environment

Installing Magento with sample data

Adding version control to the source code

Configuring the development tools



Configuring Magento themes and packages

Creating your first theme

Adding extra files to your theme

Adding jQuery support

Changing a page title

Working with translations

Understanding the theming block system

Adding widgets to the layout

Working with Products


Setting up the catalog defaults

Working with attribute sets

Working with product types

Adding a Facebook like button

Adding a product to the cart through querystring

Embedding a YouTube video

Changing the URL of a product page

Creating a Module


Creating files

Registering blocks, helpers, and models

Adding a new page

Adding a layout file

Adding a translation file

Adding a block of new products

Rewriting a core class

Database Concepts


Finding your way in the tables

Creating a database connection in Magento

Working with flat tables

Working with EAV tables

Configuring a Master/Slave setup

Repairing the database

Databases and Modules


Registering the resource models

Registering connections

Installing and upgrading scripts

Creating a flat table with models

Working with Magento collections

Magento Backend


Registering a backend controller

Extending the menu

Adding an ACL

Extending the system configuration

Creating a grid from a database table

Adding customer attributes

Working with source models

Event Handlers and Cronjobs


Understanding Magento event types

Creating your own event

Adding an event observer

Introducing cronjobs

Creating a new cronjob

Testing your new cronjob

Creating a Shipping Module


Initializing module configurations

Writing an adapter model

Extending the shipping method features

Adding the module in the frontend

Creating a Product Slider Widget


Creating an empty module

Registering helpers and blocks

Creating a widget configuration file

Creating a block and the template files

Creating a custom configuration parameter

Finalizing the theming

Performance Optimization


Exploring the limits of a website

Optimizing the database and MySQL configuration

Optimizing the Apache web server

Tuning the Magento configurations

Configuring APC and Memcached

Optimizing the PHP configurations

Analyzing the page speed

Debugging and Unit Testing


Getting started with Xdebug

Debugging with FirePHP

Installing PHPUnit

Creating a Magento test case