Book Image

Magento PHP Developer's Guide

By : Allan MacGregor
Book Image

Magento PHP Developer's Guide

By: Allan MacGregor

Overview of this book

<p>Magento has completely reshaped the face of e-commerce since its launch in 2008. Its revolutionary focus on object oriented and EAV design patterns has allowed it to become the preferred tool for developers and retailers alike.</p> <p>"Magento PHP Developer’s Guide" is a complete reference to Magento, allowing developers to understand its fundamental concepts, and get them developing and testing Magento code.</p> <p>The book starts by building the reader’s knowledge of Magento, providing them with the information, techniques, and tools that they require to start their first Magento development.</p> <p>After building this knowledge, the book will then look at more advanced topics: how to test your code, how to extend the frontend and backend, and deploying and distributing custom modules.</p> <p>"Magento PHP Developer’s Guide" will help you navigate your way around your first Magento developments, helping you to avoid all of the most common headaches new developers face when first getting started.</p>
Table of Contents (16 chapters)
Magento PHP Developer's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The form widget


So far, we have been working with the gift registry grid, but right now we aren't able to do much more than just getting the list of all the available registries or deleting registries in bulk. We need a way of getting the details of a specific registry; we can map this to the edit controller action.

The edit action will display the registry-specific details and will also allow us to modify the details and status of a registry. We will need to create a few blocks and templates for this action.

In order to view and edit the registry information, we need to implement a form widget block. Form widgets work in a similar fashion as the grid widget blocks and need to have a form block and a form container block that extends the Mage_Adminhtml_Block_Widget_Form_Container class. In order to create the form container, let's perform the following steps:

  1. Navigate to the Registries folder.

  2. Create a new class file called Edit.php at the location app/code/local/Mdg/Giftregistry/Block/Adminhtml...