Book Image

PrestaShop Module Development

By : Serny
Book Image

PrestaShop Module Development

By: Serny

Overview of this book

If you are a developer who is new to PrestaShop and wants to get a good foundation in development on the PrestaShop framework, this book is for you. It's assumed that you will have some experience with PHP5, jQuery, and HTML/CSS (no need to be an expert on it).
Table of Contents (19 chapters)
PrestaShop Module Development
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding a hook


You might want, at some points, to add your own hooks. In PrestaShop 1.5/1.6, you do not need to add it manually in your database to create a new hook anymore. In fact, you just have to place your hook's trigger in the PHP file or template file you want (with the same syntax described at the beginning of the Triggering hooks section), and then attach the module to the new hook with the registerHook method.

The registerHook method will automatically create the hook in the database if it does not already exist. It is not as efficient as an event listener system you can find in other frameworks, but it's still powerful and effective.