Book Image

Magento 1.3: PHP Developer's Guide

By : Jamie Huskisson
Book Image

Magento 1.3: PHP Developer's Guide

By: Jamie Huskisson

Overview of this book

<p>Magento is the most powerful e-commerce solution around and has gained popularity in a short period of time. You can create and manage online stores using the extensive suite of powerful tools it offers. However, because of its powerful features, developing with Magento can be easier said than done.<br /><br />This book will show you how to develop better and do more with the Magento. You will be able to extend and customize modules for the Magento system without editing the core system code. It will show you how to create both basic and advanced functionality modules for your store and help you turn your ideas for extending Magento into reality by building modules from scratch.<br /><br />This book starts by walking you through the server requirements for installing Magento making sure Magneto's installation and upgrade process can fit into your workflow and suit your hosting environment setup. Then it runs through the architecture behind Magento's system, covering the core file structure and how the template system works. You'll also learn how to build a basic shipping module, payment module, and a brand management module for Magento. As you delve deeper into the book you will learn how to integrate your favorite CMS into Magento for data portability. <br /><br />By the end of the book you will be able to take your basic knowledge of Magento and turn it into something advanced that will help you develop turn your ideas for extending Magento into reality.</p>
Table of Contents (16 chapters)
Magento 1.3: PHP Developer's Guide
Credits
About the Author
About the Reviewers
Preface
2
Installing/Upgrading Magento and Preparing for Development
6
Building a Basic Featured Products Module
Index

Using our template to create a shipping method


Now that we have our bare-bones shipping module, we continue with the creation of something that we can see an outcome from. From this we should be able to start to put together our own shipping module tailor-made for future needs.

The purpose of what we are going to build is going to be very simple: we'regoing to create a shipping module that meets the following parameters:

  • It has a handling fee, either per product or for the entire order

  • It can be limited to specific countries

  • It can set a simple flat-rate shipping cost, if 10 products or more are being ordered

  • It can set another simple flat-rate shipping cost, if 10 products or less are being ordered

  • All of the above can be configured via the Magento administration

Before progressing, we delete the previous shipping module from our installation to make sure that it does not interfere with what we'll be building. To do this, we go back to the Magento Downloader (which we've learned about in Chapter...