Child pages
  • Coding a theme

Versions Compared

Key

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

...

  1. Do not mix XHTML and PHP code.
  2. Do not mix XHTML and CSS code, put the CSS code in a separate .css file.
  3. Always validate your XHTML and CSS code using the W3C validators: XHTML validator, CSS validator.
  4. 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.
  5. Always check if a method you need does not already exist in the available classes.
  6. Always make sure to produce a clear and readable code, making it easy to maintain for anyone.
  7. Do comment your code, in English.
  8. When editing the theme on a production site, always first put the shop in maintenance mode via the back-office.
  9. Use modern browsers, such as Firefox, Google Chrome or Opera, and make sure your friends do too.
  10. Whenever possible, use CSS sprites (follow-up article).
  11. If you wish to thank PrestaShop team for its hard work, please consider donating, or spread the good word!

Customizing the default theme

...