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
About the Author
About the Reviewers

Chapter 3. Using Context and its Methods

In PrestaShop, the Context object is something close to (but unfortunately not as flexible as) a service container (or dependency injection container) that you can have in other frameworks. This container is filled with common objects (such as cookies, current language, and so on), and services (such as Smarty).

In this chapter, we will learn how to:

  • Use the l method and make your module multilingual

  • Use the addCSS and addJS methods to improve the ergonomy in the front office