Book Image

PrestaShop Module Development

By : Fabien Serny
Book Image

PrestaShop Module Development

By: Fabien Serny

Overview of this book

Table of Contents (19 chapters)
PrestaShop Module Development
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Checking compatibilities and dependencies


There are some interesting features available with each module. We won't use it in our module, but it is still something interesting to know.

The compatibility check

You just have to set the ps_versions_compliancy variable in your constructor with PrestaShop's minimum (and maximum) version needed to make the module work:

$this->ps_versions_compliancy = array('min' => '1.5.2', 'max' => '1.6.0.7');

The previous line means that your module works with PrestaShop 1.5.2 and further versions until PrestaShop 1.6.0.7.

If you try to install a module that contains the previous line on PrestaShop 1.5.1, your module won't install and an error message will be displayed.

The dependency check

You just have to set the dependencies variable in your constructor with an array of the modules needed to be installed before the current module:

$this->dependencies = array('paypal', 'blockcart');

This line means that you have to install paypal and blockcart modules before...