V
V
vladHD2016-02-29 13:26:04
CMS
vladHD, 2016-02-29 13:26:04

How to build the structure of a prestashop theme?

Hello everyone, actually a question on the structure:
There is a paid premium theme, you need to make a website on its basis. For example, in WordPress, in this case, a child theme was created, which had its own templates, which, roughly speaking, overridden the parent theme, but the code of the parent theme naturally did not change. And how is it organized in prestashop?
Thank you for your attention.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Ilyasov, 2016-02-29
@vladHD

This is a very capacious topic and cannot be answered in one sentence.
Templates in Prestashop are based on Smarty. You need to know it.
First of all, the file structure of the template consists of the following folders: css, js, img, lang.
In general, if you have a very complex template, then you may need to create your own modules. This is also a separate voluminous topic.
The HTML part (together with Smarty variables) is created in a folder with ".tpl" extension. They have their own names for overriding. Typical titles: header.tpl, index.tpl, footer.tpl (main page), as well as typical template pages, for example: 404.tpl, address.tpl, category.tpl, product.tpl, sitemap.tpl... etc.
More detailed initial information about all this is described here (thanks to Gnom1k from the Prestashop forum for translating the English article) The
information is a little outdated, but the essence is described there.
I advise you to start by exploring and editing the default Prestashop 1.6 "default-bootstrap" theme on your own. Separately, find and study the topic about hooks (hooks), Prestashop Smarty variables and more. Try searching the web for information. Perhaps some video tutorials. Most of the information is in the bourgeois Internet (if you know English, it is better to look there). It is advisable to look for the latest information on creating templates for Prestashop 1.6 (1.5 is fine too (this is the base), but there are slight differences).
I hope I helped you and put you on the right path. Good luck! =)

Read more in the comments to this answer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question