You are previewing Magento 1.3: PHP Developer's Guide.
O'Reilly logo
Magento 1.3: PHP Developer's Guide

Book Description

Design, develop, and deploy feature-rich Magento online stores with PHP coding

  • Extend and customize the Magento e-commerce system using PHP code

  • Set up your own data profile to import or export data in Magento

  • Build applications that interface with the customer, product, and order data using Magento's Core API

  • Packed with examples for effective Magento Development

  • In Detail

    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.

    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.

    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.

    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.

    Table of Contents

    1. Magento 1.3: PHP Developer's Guide
      1. Magento 1.3: PHP Developer's Guide
      2. Credits
      3. About the Author
      4. About the Reviewers
      5. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      6. 1. Magento 1.3: PHP Developer's Guide
        1. Extending Magento
        2. Core development functionality coverage
          1. Core principles of development
          2. System maintenance
          3. Payment and shipping module development
          4. Module development
          5. Data portability and interaction
        3. Chapter overview
          1. Installing, upgrading, and preparing for development
          2. System architecture
          3. Shipping modules
          4. Payment modules
          5. Basic module creation and implementation
          6. Fully-featured module development with administration panels
          7. Integration of third-party CMS
          8. Magento's core API
          9. Importing and exporting data
        4. Summary
      7. 2. Installing/Upgrading Magento and Preparing for Development
        1. Requirements
        2. Types of installation
          1. Manual
            1. Installing
              1. Database Connection
              2. Web access options
              3. Session storage options
            2. Upgrading
          2. Downloader
            1. Installing
            2. Upgrading
          3. SSH (Secure Shell)
            1. Installing
            2. Upgrading
          4. SVN (Subversion Network)
        3. Summary
      8. 3. Magento's Architecture
        1. Magento's base structure
          1. Base directory
            1. The function of each of the files in the base directory
            2. The function of each of the folders in the base directory
        2. The template system architecture
        3. Structural blocks and content blocks
          1. XML layout files
          2. Hierarchical file processing
        4. Modules and how they work within the system
          1. Distribution of the modules between directories
          2. Modules included with Magento
          3. Setting up the folder structure of a module
        5. Zend Framework and its role within Magento
          1. What is Zend Framework
          2. How Zend Framework works
          3. It's role and effect in Magento
        6. Backing up Magento's data
          1. Backing up the files
            1. Manually
            2. Using SSH
              1. Zipping up all files
              2. Copying all files to another directory
          2. Backing up the database
            1. Using the system itself
            2. Using phpMyAdmin
        7. Summary
      9. 4. Shipping Modules in Magento
        1. What shipping modules do
        2. How to begin with a shipping module
          1. The configuration files
          2. The adaptor model
          3. The administration setup
          4. Declaring further fields and learning how they're structured
          5. Appearing in the administration
            1. Free shipping
            2. Handling
            3. Restricting a shipping method to certain countries
        3. Using our template to create a shipping method
          1. The configuration files
          2. Our adaptor
          3. The administration configuration
          4. Testing our newly built module
          5. Code to allow our shipping module to meet our needs
        4. Summary
      10. 5. Building a Payment Module for Magento
        1. How payment methods work in Magento
          1. Payment methods that are bundled with Magento
          2. Downloadable payment methods on Magento Connect
        2. Building the base of a payment method
          1. Module declaration
          2. Module configuration
          3. The adaptor model
            1. Payment information storage
            2. Four core components
              1. The processing of the payment
              2. After the order has had its payment successfully processed
          4. Declaring configuration options for the admin panel
            1. Setting up the core fields
            2. Some other field types you can use
            3. Obscuring fields
            4. Custom fields from our models
          5. Tying in automatic shipping tracking/updating
          6. Automatic shippingtracking and code-generation tie-in
        3. Summary
      11. 6. Building a Basic Featured Products Module
        1. How it works
          1. Creating the attributes in the system
          2. Setting the field values
            1. Attribute Properties
            2. Frontend Properties
            3. Manage Label/Options
          3. Creating the core module with functionality
          4. Adding the XML block declaration for display of the module on the frontend
          5. Creating templates for display
          6. Defining the module in the local .xml module configuration file
        2. Summary
      12. 7. Fully-Featured Module for Magento with Admin Panel
        1. Creating our first Hello World message
          1. Setting up the display template
          2. Placing the display template in a layout .xml file
        2. Creating our first /helloworld/ URL structure
          1. The directory structure
          2. Giving the module a backend
          3. Configuring the module
          4. Our controller
          5. The Helper model
          6. The module's default model
          7. Template blocks and display
            1. Display block class
            2. The layout .xml file
            3. The design template file
          8. Viewing /helloworld/
          9. Taking a look at what we've put together
        3. Using the Module Creator script to get Hello World
          1. Installing the Module Creator
          2. Creating our first module with the Module Creator
          3. The contents of our new module
        4. Hello World
        5. Expanding our module further into a database-driven, administrated brands module
          1. Recreating the base
            1. The directory structure
            2. Enabling the module in the backend
            3. Our controller
            4. Configuring the module
            5. The Helper model
            6. The module's default model
            7. The module's frontend display base
              1. Display block class
              2. The layout .xml file
              3. The design template file
          2. Extending the base towards introducing a database
            1. The configuration .xml file
            2. The mySQL4 data models
            3. Database setup and installation of the file
          3. Extending the module to include an administration
            1. Adminhtml directories
            2. Administrative display blocks
            3. Defining the core administrative backend to the system
            4. Defining the add/edit screens to the system
              1. Key lines in this code
            5. The module's grid display declaration
              1. The __construct()
              2. Preparing the columns
              3. The getRowUrl() function
            6. Preparing the form
            7. Defining the add/edit form tabs
            8. Configuring and preparing the form for display
            9. Setting up our brand status array
            10. Creating a controller to process access URLs
            11. Changing the module's config.xml to reflect the administrative backend
            12. Giving our administrative backend a layout .xml file
            13. A look at the administrative backend
          4. The index controller
          5. Displaying the brands data
        6. Summary
      13. 8. Integration of Third-Party CMS
        1. Notable things about CMS Integration
        2. The WYSIWYG editor implementation
        3. Integrating Wordpress
          1. Installation
          2. Configuration
            1. WordPress Blog Settings
            2. WordPress Blog Menu
          3. Changing the display of integration
            1. Page/post layout
            2. Sidebar
        4. Other content management systems
          1. Typo3
          2. Drupal
          3. ExpressionEngine
          4. Joomla!
        5. Summary
      14. 9. Magento's Core API
        1. What is the Core API?
          1. Which Core APIs are included?
          2. What do the Core APIs do?
          3. Prerequisites to using the Core API
          4. Examples of what can be done with the Core API
          5. Giving scripts access to the Core API
        2. Choice of protocols
          1. SOAP
            1. Checking for SOAP installation on the server
            2. Putting SOAP to use
            3. Zend Framework SOAP Client
          2. XML RPC
            1. Getting XML RPC on our server
            2. Setting up the Zend Framework XML RPC class
            3. Putting XML RPC to use
        3. Basic API methods
          1. Describing the methods
          2. Understanding the methods individually
            1. startSession()
            2. endSession(sessionId)
            3. login(apiUser, apiKey)
            4. call(sessionId, resourcePath, array arguments)
            5. multiCall(sessionId, array calls, array options)
            6. resources(sessionId)
            7. globalFaults(sessionId)
            8. resourceFaults(sessionId, resourceName)
          3. Global API Faults
        4. Basic API scripting: Customer API
          1. Getting started
          2. Creating a customer
          3. Retrieving an individual customer's details
          4. Updating the customer's details
          5. Listing all customers from the database
          6. Deleting a customer from the database
        5. Complete list of available resources and methods
          1. Customer methods
          2. Directory methods
          3. Catalog methods
          4. Sales methods
          5. Inventory methods
        6. Summary
      15. 10. Importing and Exporting Data
        1. What kind of data can I export or import?
        2. An introduction to the interface
          1. Profile Wizard
            1. Profile Information
              1. Name
              2. Entity type
              3. Direction
              4. Store
            2. File information
              1. Data transfer
              2. Type
              3. Path
              4. File
            3. Data Format
              1. Type
              2. Original Magento attribute names in first row
              3. Export
            4. Field Mapping
            5. Export Filters
          2. Upload Files
          3. Run Profile
          4. Profile Action XML
          5. Profile History
        3. Sample implementation: Import/Export of metadata
          1. Exporting our metadata
            1. Setting up the Profile Information
            2. Adding the File Information
            3. Selecting the Data Format
            4. Mapping our fields
            5. Choosing the Export Filters
          2. Importing our metadata
            1. Setting up the Profile Information
            2. Adding the File Information
            3. Selecting the Data Format
            4. Mapping our fields
        4. Common issues with importing/exporting
          1. Bad CSV file formatting
          2. Short descriptions
          3. Import/export paths
          4. Images location
          5. Importing multiple images
        5. Summary