πŸ†πŸ†πŸ† I've been certified as an Adobe Community Advisor for 2021-2022! Read more on the Adobe MVP blog post πŸ†πŸ†πŸ†

114 Posts

Constants and variables for Prestashop 1.7 [PHP, Smarty, Javascript, Twig]

Ever wondered what constant to use in your controllers? Is it _PS_ROOT_DIR_ or __PS_BASE_URI__? In smarty templates, would you go for {$urls.img_dir} or Read more

Understanding the cache of Prestashop 1.7 (and Symfony)

Cache allows your customers to enhance their shopping experience by greatly improving page load. For example, each time a customer searches for iphone 8 in your store, Prestashop...

Controller lifecycle in PrestaShop 1.7

Execution order of the controller’s functions : classes/controller/Controller.php :

Use Db, the database class in PrestaShop 1.7

Tired of using raw SQL? SELECT * from _DB_PREFIX_.customer is dead! Use the chainable API provided by Prestashop with its DbQuery class:

Create a new front controller from scratch (Part 2/2) [Prestashop 1.7]

Prestashop can be used to display any page that you want. Either it’s pure HTML or templated data with Smarty, or even Twig since Prestashop 1.7! In this tutorial, we...

Generate URLs and links in Prestashop 1.7

You always need to generate your links and URLs. Hardcoded ones are a really bad habit. Coming from a Symfony environment, I’m familiar with $router->generate('my-route') but how does...

Embed a Symfony controller into a Prestashop controller

We are migrating from 100% Symfony to Prestashop 1.7 but we would like to keep and re-use our existing codebase. Here’s a how-to.