
Set up the Prestashop development environment by choosing an editor like VS Code, installing extensions, and configuring MySQL on Windows or Linux, then verify with the shop's compatibility script.
Explore the fundamentals of Prestashop development, including themes, modules, overwriting, and the shift from 1.6 to Symfony-based 1.7 for modular, testable MVC architecture.
Understand the big picture of a prestashop module, from the main BHB file and module class to the module directory, file structure, controllers, views, translations, and overrides.
Learn Prestashop module coding standards, covering encoding (utf-8 without a bom), unix line endings, trailing blank lines, spacing conventions, strict typing, javascript (airbnb style), html doctype, and license blocks.
Create your first Prestashop module by building a directory and a main PHP file, define core properties like name, tab, and version, enable bootstrap, and install it.
Override the install and uninstall methods in a Prestashop module, call the parent install, register gdpr consent hooks, and manage database table creation and removal to ensure installation succeeds.
Explore the configuration object in Prestashop, a class that manages the configuration table and key-value settings across languages and stores using get and update methods.
Explore Prestashop hooks, including display and action hooks, and learn how modules subscribe to, register, and render content in templates and front-end assets.
Explore the legacy hooking system by adding a display footer hook to a basic module, register it in the admin panel, and output a hello message.
Create a legacy hook custom template by placing a footer template under module/views/templates/hooks and hooking the display method to render it, then test on the front page.
Learn how to pass dynamic data to a smarty template in a Prestashop module by assigning variables and rendering them, with examples like name and cart id.
Learn how the widget API lets a module display content everywhere by implementing render widget and get widget variable, tying to core hooks and Smarty templates.
Enable widget API support by implementing the widget interface in a Prestashop module, covering render widget, get widget variable array, and hooking into display footer to render smarty templates.
Learn how the getWidgetVariables method returns an array of template parameters by passing a hook name and configuration, enabling widget rendering and parameter assignment in Prestashop module development.
Create a module configuration page by implementing a getContent method, returning the configuration page content, and verifying the configure option in the module admin menu.
Learn to build a Prestashop configuration page with a tpl template inside the admin directory, fetch content, and render a form using the configuration object and Smarty assignments.
Define a module handler to process form submissions from a TPL file, retrieve post or get values, update a configuration key, and display a success message in the Smarty template.
Learn to build admin forms in Prestashop modules using the form helper, defining fields, legends, tokens, and bootstrap-driven inputs, with default language handling and configuration integration.
Enable robust form submission handling in a PrestaShop module by validating input, updating the database, and displaying translatable success or error messages via the helper form.
This lecture introduces Prestashop controllers, detailing front controllers (native and module) and admin back controllers with examples like card, address, and dashboard.
Create a front controller for a Prestashop module by following directory structure and class naming rules, extend the module front controller, and plan rendering templates and link generation.
Use initContent in the front controller to render templates, assign data via context, and differentiate get requests for retrieval and display from post requests for input and persistence.
Discover how the post-process method in a front controller intercepts submitted data, performs redirects with class tools, and runs before init content to guide the front page module.
Generate a front module link in Prestashop using the link class and getModuleLink, passing the module and controller name, then test on the front page and observe the rendered link.
Register a hook route to create custom front controller links, return a multidimensional parameter array for controllers and rules, and verify the new URL renders your module content.
Explore legacy and modern controllers in Prestashop 1.7, comparing a custom legacy framework with Symfony-based controllers, and leverage Twig, UI kit, Bootstrap, and the service container for admin views.
Set up the module's controllers/admin directory, create a legacy admin controller file named admin_tasks, define a class named admin_tasksController, and extend ModuleAdminController to form a valid admin legacy controller.
See how Prestashop admin controllers use the active record pattern via the object model class to provide an api and interact with the database without direct queries.
Set up admin controller to manage a database table with the object model and live active record pattern, including install/uninstall table creation and the install tab in the admin menu.
Create a new Comment.class.php object model extending the object model. Define the database table with id, user id, and comment fields, and override the definition for types and validation.
Import the ObjectModel class into the module's admin controller, override the constructor, and define the table, class name, identifier, and fields list to render data with bootstrap and row actions.
Override the admin module controller's render method to build a forum edit page using a fields form array, defining id and title fields with mapping, and a submit action.
Explore how to render data on the view page in a Prestashop module by creating admin templates with Smarty, using the create template method, and passing variables for dynamic content.
Fetch data with the DB Query helper by selecting fields from a table, applying an id-based where clause, executing the query, and rendering results in an admin module view.
Learn to render admin controller data using a custom tpl file instead of helpers, by implementing initContent, overriding content, and assigning it via smarty context to the main admin template.
Explore how a modern shop controller uses the Symfony service container, Twig, and Doctrine with Bootstrap four, and learn that a bundle is a single-feature package handling product commands.
Create a modern Prestashop module controller by setting up a Symfony-style directory, namespace, and routing, then implement an index action returning a proper HTTP response.
Develop a Twig template for the index action by extending the admin controller and rendering the command.html.twig view, using the Twig templating engine in a Symfony module.
Extend prestashop admin templates with twig by inheriting a parent layout and overriding blocks. Use the extends keyword and define content blocks to restore menus, headers, and styling.
Pass a variable from the controller to a Twig template in a Prestashop module by defining an array with values 1, 2, 3 and displaying it with double curly braces.
Build and render a Symfony form with the form builder to edit data, add a unique text field with options, create the form view, and render it in Twig.
Create a form class by extending Symfony form type and implementing buildForm to add text and date fields. Update the controller to use createForm with this class and refresh autoload.
Learn what an entity is in Doctrine ORM for Symfony, mapping a PHP object to a table with annotations and a primary key, and how to create and persist data.
Persist an entity to the database by loading the Doctrine entity manager through dependency injection, setting attributes, and flushing, while mapping namespaces and testing via the command.
Learn to store form data through an entity to the database by configuring name, description, and price fields, retrieving input values, and persisting them with Symfony forms.
Implement flash messages in a Symfony controller using addFlash to show success or error feedback after form submissions, render them in templates, and customize styling for custom types.
Create an endpoint and route to fetch data from the database and display it on a listings page using Doctrine repository and entity manager to fetch all.
Learn to implement update functionality in a Prestashop module by building an edit form, loading data by id, handling submission, flushing changes, and redirecting with a success message.
Explore the basics of a payment module for a Prestashop shop, learn what makes a module valid, and build a real-life example to wrap up the chapter.
Explore the anatomy of a Prestashop 1.7 payment module and learn how to implement, register hooks, and define payment options, including offline, external, embedded, and iframe methods.
Develop and install a custom offline payment module for Prestashop by creating the module structure, defining hooks payment options and payment return, and implementing a checkout form and admin configuration.
Learn how the Prestashop validation controller processes payments and converts a card object into an order. It connects to payment gateways, updates order status, and sends confirmation emails.
Create a customized confirmation message on checkout by using a payment return in the Alui Pay module, rendering a TPL on the confirmation page via a hook.
Learn to send a custom order confirmation email during order validation with the mail class, using the customer email as receiver and concatenating first and last names for the sender.
Welcome to the Advanced Prestashop module developer guide course!
In this course you will learn all what you need to start coding modules for Prestashop 1.7.
Modules can play a major role in creating a successful business hence the importance of learning to code them.
The main focus point is to deliver a simple and straight to the point information.
We will walk through 5 hours of content as follow:
First section: The fundamentals of Prestashop development
Starting by Prestashop architecture, coding standards
Second section: modules
We will create a basic module and learn about various topic such as the various module methods and the use of each, the hooking system, creating an admin configuration page with template and with helpers.
We will also explore the widget API and understand the main two methods
Third section : controllers
We will learn about the module controllers and the various types of them such as admin and front controllers also we will dive in the modern controllers with a solid example including CRUD operations.
Learn how to use Symfony bundle inside Prestashop, how to setup routing, create action and define forms and entities
Final part : Payment modules
In this section we will focus on a specific type of modules known as 'Payment module', I'll be explaining the anatomy of a payment module, the various types and end up by creating a fully functional payment option ( module ).
Who this course is for:
PHP developers with basic knowledge who want to develop complex modules form Prestashop 1.7
Prestashop Backend developer
Web agencies