PrestaShop Developer Conference
PrestaShop Developer Conference
Paris, France - November 6, 2024
Let's talk code, commerce and open source.

Hook displayOverrideTemplate

Informations

Change the default template of current controller
Hook displayOverrideTemplate
Locations
FO
Type display
Origin core
Aliases

Located in

Origin File
core classes/controller/FrontController.php

Call of the Hook in the origin file

Before 8.1

Hook::exec(
  'displayOverrideTemplate',
  [
    'controller' => $this,
    'template_file' => $template,
    'id' => $params['id'],
    'locale' => $locale,
  ]
)

From 8.1

Hook::exec(
  'displayOverrideTemplate',
  [
    'controller' => $this,
    'template_file' => $template,
    'entity' => $params['entity'],
    'id' => $params['id'],
    'locale' => $locale,
  ]
)