-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Practical Module development for Prestashop 8
By :
In this chapter, we saw that all FO pages are generated by controllers located in the /controllers/front/ folder. All those controllers are child classes of the FrontController class defined in the /classes/controller/FrontController.php file. The FrontController class is a child of the Controller class defined in the /classes/controller/Controller.php file.
While Controller defines the generic life cycle of both BO and FO controllers, FrontController prepares all the general e-commerce data for the views and makes sales possible.
Finally, we saw in the CmsController example that FO controllers can manipulate the database with the help of the ObjectModel child classes. They can define which template to use to generate the view with Smarty.
This explanation can be tough for beginners, but even if you don’t need to know all of that to create a module, it is interesting to master the whole process behind FO controllers. In the next chapter, we will jump into the...