-
Book Overview & Buying
-
Table Of Contents
Practical Module development for Prestashop 8
By :
In this chapter, we discovered that a module is a class defined in the /modules/ folder following certain rules on naming.
This class has to extend the Module class or one of its children classes. Every Module class must implement a __construct() method to set some required attributes, provide install() and uninstall() functions, and if the module registers with some Hooks, then it must implement the hookNameOfTheHook($params) function with NameOfTheHook replaced by the real hook name.
We also saw how to add a logo to our module listing, secure the folder, install/uninstall our module in practice, and finally tested it.
In the next chapter, we will create another module, displaying reinsurance blocks on the FO. This will be a nice way to further improve our knowledge of modules!