...
PrestaShop's theme system is based on a template engine, called Smarty (http://www.smarty.net/), which allows web-designers and developers to easily build their own theme, with little technical knowledge.
Tip |
---|
All web-designers and developers should use the following developer tools:
They provide a lot of useful tools, among which DOM explorer, CSS editors, network inspector, etc., and are a huge help when debugging HTML, CSS, JavaScript, and even Ajax requests. |
PrestaShop's technical architecture
...
Concepts and technical information
Best practices
Here is a non-exhaustive list of best practices that you should follow when creating a theme:
- Do not mix HTML and PHP code, use Smarty tags in order to a dynamic page.
- Do not mix HTML and CSS code, put the CSS code in a separate
.css
file. - Always validate your HTML and CSS code using the W3C validators: http://validator.w3.org/ for HTML and XHML, http://jigsaw.w3.org/css-validator/ for CSS.
- Do not make SQL queries from a PHP controller (
.php
file at the root of PrestaShop); prefer the use of existing methods from the PrestaShop classes, or create new methods for these classes. - Always check if a method you need does not already exist in the available classes.
- Always make sure to produce a clear and readable code, making it easy to maintain for anyone.
- Do comment your code, and write in English.
- When editing the theme on a production site, always put the shop in maintenance mode first, via the back-office' "Maintenance" preference page.
- Use modern browsers, such as Firefox, Google Chrome, IE9 or Opera (and make sure your friends and family members do too.
- Whenever possible, use CSS sprites (read http://www.alistapart.com/articles/sprites and http://www.alistapart.com/articles/sprites2/).
How a theme works
A PrestaShop theme is a set of files which you can edit in order to change the look of your online shop.
...