Child pages
  • Characteristics of a front-office theme

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following graphic explains how data is transmitted from PrestaShop's core to its theme. Using It uses the l() method enables to present how the theme to display displays its text in the chosen language, if it has been translated beforehand.

...

You can (and should) provide a mobile version of your theme. PrestaShop 1.5 is built to automatically use the theme available in the /mobile sub-folder in situations when the store is being viewed from a mobile device.

All of its files should be in the /mobile folder, within the theme's main folder.

...

You should provide your own mail and PDF templates, and make them match the theme's style.

The easiest way to get started is to copy PrestaShop's default mail templates folder (from the root /mails folder) into the theme's /mails sub-folder, and edit the files to fit your theme's style.
Likewise, copy PrestaShop's default PDF templates folder (from the root /pdf folder) into the theme's /pdf sub-folder, and edit the files to fit your theme's style.
Note that the mail files are duplicated as many folders as there are available languages. The translation is to be made using PrestaShop's translation tool.

You can selectively override the default templates: if one of the default file is missing in your version of the /mails or /pdf folder, PrestaShop will use the one from the equivalent root folder.

...

PrestaShop's modules can have templates of their own, in their /views/templates/front/views/templates/admin and /views/templates/hooks folders.
For instance, the Bankwire has these templatesmodule has the following template files:

  • /modules/bankwire/views/templates/front/payment_execution.tpl
  • /modules/bankwire/views/templates/hook/payment.tpl
  • /modules/bankwire/views/templates/hook/payment_return.tpl

In order to override a module template file, your template theme must have a file of the exact same name in the same exact file path, but within its own folder. So, for instance, for the three Bankwire templates above, the resulting file names paths should be:

  • /themes/my_theme/modules/bankwire/views/templates/front/payment_execution.tpl
  • /themes/my_theme/modules/bankwire/views/templates/hook/payment.tpl
  • /themes/my_theme/modules/bankwire/views/templates/hook/payment_return.tpl

...