Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.

You might want to look at the current version, PrestaShop 8. Read the current version of the documentation

Hook actionFrontControllerSetVariablesBefore

Informations

Add general purpose variables in JavaScript object and Smarty templates before assignation. Allows defining variables for the JavaScript object before the core does it.
Hook actionFrontControllerSetVariablesBefore
Locations
FO
Type action
Origin core
Aliases
Description Allows defining variables for the JavaScript object before the core does it.

Located in

Origin File
core classes/controller/FrontController.php

Call of the Hook in the origin file

Hook::exec(
            'actionFrontControllerSetVariablesBefore',
            [
                'templateVars' => &$templateVars,
                'cart' => $cart,
            ]
        );