How to create a child theme in PrestaShop
The modifications that you have made to the files of a theme will be overwritten when you update that theme. So after a theme upgrade you will also have to make the modifications again (if any, of course).
When it comes to the default theme that comes prepackaged with PrestaShop, for example, the automatic updater let's you keep the modifications by just not updating the theme. If you update your PrestaShop manually, of course you can also skip to update the theme in order to keep any modifications that you have made to the code of the theme's files.
However, if you want to update the original theme, but you still want to keep the modifications, you can create a child theme. This can be done very easily. You only need to copy the theme's files into a folder with a name different than that of the original theme.
Let's say, for example, that you want to create a child theme of the theme default-bootstrap. Inside the themes folder in the root PrestaShop directory on your PrestaShop hosting account create a folder with a name different than that of the original theme. If, for example, your PrestaShop is installed directly in the root public_html directory on your hosting account, then you have to create the folder for the child theme in public_html/themes. Give the folder a name different than the folder of the the original theme, for example default-bootstrap_child. Then copy the files and subfolders that are in default-bootstrap and paste them in default-bootstrap_child. You can use an FTP client or the Pixie control panel to create the new folder and copy the files. The last thing to do is to switch to the child theme from your store's backend. In PrestaShop versions older than 1.5 you can do this from Modules menu>Themes sub-menu, and in PrestaShop 1.5 and newer versions you can do this from Preferences menu>Themes sub-menu.
Was this answer helpful?
- How to add and manage geographical regions in PrestaShop 1.5-1.6
- How to create and manage attributes in PrestaShop 1.5-1.6
- How to remove or change the PrestaShop PayPal logo
- How to configure shipping and carriers in PrestaShop 1.5-1.6
- How to remove the short description of products from the homefeatured block in PrestaShop