Understanding what a theme is and its structure
First, you have to know what a theme represents. It is a folder located in the /themes/
directory, and it contains all the necessary elements and a specified structure to provide a graphical appearance to the FO of PrestaShop.
If you are familiar with WordPress, you should already know about themes; they are the exact equivalent of PrestaShop themes. Even if you can have multiple themes stored in your /themes/
folder, only one can be activated at a time per shop. You always must have one theme activated.
If your website is multistore, you must have one theme activated per shop. PrestaShop stores the active theme name in the Shop
ObjectModel
class; you can verify that if you check the /classes/shop/Shop.php
file, where you should note the presence of a variable called $theme_name
. It’s a string containing the theme name that corresponds to the folder name of the theme activated.
The theme is retrieved via the Shop
object...