Free Sample
+ Collection

Magento 1.4 Development Cookbook

Nurul Ferdous

Extend your Magento store to the optimum level by developing modules and widgets
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849511445
Paperback268 pages

About This Book

  • Develop Modules and Extensions for Magento 1.4 using PHP with ease
  • Socialize your store by writing custom modules and widgets to drive in more customers
  • Achieve a tremendous performance boost by applying powerful techniques such as YSlow, PageSpeed, and Siege
  • Part of Packt's Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible

Who This Book Is For

If you are a PHP developer or a software engineer, novice or experienced, interested in achieving high impact in a fast-paced development environment and want to boost your PHP/Magento development skills to the next level then this book is for you.

No prior experience with Magento is required but basic knowledge of PHP is needed.

Table of Contents

Chapter 1: Getting Started with Magento Development
Preparing the platform with a virtual host
Setting up a Subversion/SVN
Getting the latest copy of Magento with the SVN checkout
Setting up MySQL tools
Setting up a Magento project with NetBeans
Working with Magento code
Chapter 2: CMS and Design
Adding a home link to the menu bar
Changing any page title in Magento
Customizing a Magento error page
Adding AdWords tracking code to order confirmation page in Magento
Adding a custom CMS layout template
Adding an RSS feed (last five tweets!)
Placing the trusty old contact form in CMS
Integrating JW Image Rotator 3.17 in Magento
Chapter 3: Adding Extra Functionalities
Integrating WordPress in Magento
Creating a new page
Adding jQuery support
Adding Lightbox2 in Magento
Adding an accepted payment banner at the footer
Chapter 4: Customizing a Store
Creating a custom "Twitter handle" field in a registration form
Deleting orders in Magento
Using Google Website Optimizer
Creating a custom variable and using its own e-mail templates
Using Google analytics for Magento
Creating Catalog and Shopping Cart Price Rules
Creating a featured product and showing it in the home page
Creating a custom admin theme
Chapter 5: Playing with Products
Setting up the Catalog defaults
Adding a Facebook 'Like' button in product page
Setting up Table Rates shipping
Adding a product to the cart through Querystring
Creating a configurable product
Embedding a YouTube video in product details
Chapter 6: Adding a Professional Touch to Your Site
Installing Magento 1.4 in PHP 5.3.2 (without mcrypt)
Optimizing Magento store for search engines
Implementing PayPal Website Payments Pro and Express Checkout into Magento
Preventing a CSRF attack in Magento
Chapter 7: Database Design
Resources and database connections
Magento database replication using Master Slave setup
Using the Magento’s Singleton method
Repairing the Magento database
Working with Magento’s EAV design
Chapter 8: Creating a Module
Creating an empty module with a Module Creator
Creating the required directories
Activating a module
Creating a controller for the module
Creating a configuration XML file for the module
Creating a helper for the News module
Creating models for the module
Setting up SQL for the News module
Designing a template for the News module
Adding required blocks for the News module
Chapter 9: Creating a Shipping Module
Initializing module configuration
Writing an adapter model
Adding a module in backend
Adding a module in frontend
Chapter 10: Writing a Social Widget
Creating an empty module and an enabler file
Creating a config file and declaring the widgets
Writing the default module helper Data.php
Creating a source model for services multi select in widget configuration
Creating frontend block for our widget
Creating templates
Chapter 11: Performance Optimization
Measuring/benchmarking your Magento with Siege, ab, Magento profiler, YSlow, Page Speed, GTmetrix, and WebPagetest
Optimizing Magento database and MySQL configuration
Optimizing Apache web server configuration
Tuning Magento configurations
Using APC/Memcached as the cache backend
Accelerating PHP: php.ini configuration
Applying YSlow and Page Speed rules
Chapter 12: Debugging and Unit Testing
Installing and configuring Xdebug
Using FirePHP with Zend Wildfire plugin
Installing PHPUnit and necessary PHP CLI binaries
Writing your first Magento test case

What You Will Learn

  • Write custom modules and widgets for Magento to make your site look and behave just like you want it to
  • Build a new Base 64.php plugin that handles the cryptography for Magento while you install Magento in PHP 5.3.X without the mcrypt module
  • Add a LIghtbox 2 tool on your store and tweak its libraries to display images as per your requirements
  • Integrate the Facebook Like plugin in Magento to enable users to making connections to your pages and share content back to friends on Facebook with just one click
  • Create a new database connection that would work on any database and write an SQL query against the Magento database using a singleton method
  • Prevent CSRF, XSS, DDoS attacks in Magento by customizing Magento code
  • Write Unit Tests with PHPUnit for Magento
  • Optimize database, php.ini, caching, and web server configuration
  • Replicate the Magento database with a master-slave setup by tweaking the database configuration file and configuring the MySQL servers accordingly

In Detail

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.

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.

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.


Read More