Book Image

Magento PHP Developer????s Guide, 2nd Edition

By : Allan MacGregor
Book Image

Magento PHP Developer????s Guide, 2nd Edition

By: Allan MacGregor

Overview of this book

Table of Contents (16 chapters)
Magento PHP Developer's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Extending the API


Now that we have a basic understanding of how to use the Magento Core API, we can proceed to extend and add our custom functionality. In order to add new API functionality, we have to modify/create the following files:

  • wsdl.xml

  • api.xml

  • api.php

In order to make our registries accessible for third-party systems, we need to create and expose the following functions

  • giftregistry_registry.list: This retrieves a list of all the registry IDs; it takes an optional customer ID parameter

  • giftregistry_registry.info: This retrieves all the registry information; it takes a required registry_id parameter

  • giftregistry_item.list: This retrieves a list of all the registry item IDs associated with a registry; it takes a required registry_id parameter

  • giftregistry_item.info: This retrieves the product and detailed information of a registry item; it takes a required item_id parameter

Note

There's a challenge here. So far, we have only added reading operations; try to include API methods to...