Child pages
  • Views within PrestaShop
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Views within PrestaShop

PrestaShop uses the Smarty template engine to generate its views: http://www.smarty.net/

The views are stored in .tpl files, and are used throughout PrestaShop:

  • Front-office view: the files belong to the enabled theme, which is located in the /themes/ folder.
    For instance, with the default theme: /themes/default-bootstrap/product.tpl
  • Back-office view: the files belong to the enabled theme, which is located in the /admin-dev/themes/ folder.
    For instance, the the default back-office theme: /admin-dev/themes/default/template/controllers/products/information.tpl

Modules can add their own templates to adapt parts of the interface:

  • the front-office: /modules/bankwire/views/templates/front/payment_execution.tpl
  • the back-office: /modules/blocklayered/views/templates/admin

A view name is generally the same as the name for the code using it. For instance, 404.php uses 404.tpl.

View overriding

As there is no inheritance, there is no way to override a view.

In order to change a view, you must rewrite the template file, and place it in your theme's folder.

  • No labels