New developer documentation for PrestaShop 1.7
It's online and focusing on differences between 1.6 and 1.7
PrestaShop 1.7 is a major release: a lot of code has been refactored, new features have been added, and a new way of building themes has been introduced. So, very early in the development release cycle, we decided to write more doc in order to support the designers and developers intending to switch to 1.7.
The documentation’s very first draft is now online: http://developers.prestashop.com/
Historically, PrestaShop hosted its documentation on http://doc.prestashop.com, powered by the Atlassian Confluence wiki system. We feel it is not very developer-friendly – you can’t contribute easily (you have to ask for a user account to be created), the design is outdated, too many clicks are needed to reach an information, etc. - so we decided to move to another system for the 1.7 technical documentation.
As of today, the legacy documentation website is still online, and the new website basically hosts the 1.7-specific tech doc (themes and modules):
- 1.4-1.7 merchant doc and 1.4-1.6 tech doc: http://doc.prestashop.com
- 1.7 tech doc: http://developers.prestashop.com
We’re an open source company, so it was important to us that this new doc site should reflect that spirit. We want you to be part of it. We hope to achieve this simply by making the doc feels more like code. Contributing to the tech documentation is now not so different from contributing to PrestaShop!
About the stack: it’s powered by Sphinx. This engine was built to power the Python documentation and became very popular. It’s pretty similar to Jekyll (used by this blog): it takes a set of plain text files and generates a static website.
Documentation has to be written in reStructuredText.
Available on GitHub (with GitHub Issues)
Since it’s plain text files, it’s versioned with Git and hosted on GitHub. Is there an easier way for you, as developers, to contribute? :)
Please open a pull request to fix or add anything. You can open an issue if you want to request documentation about anything specific. For example: “how to use the new product page hooks”, or “how to use the theme template in a module”.
State of the documentation
No design yet
If you already clicked on the link and looked at the documentation, you might be thinking that it’s ugly. We’re still using one of the default themes of Sphinx, but don’t worry, our wonderful Product Designer @leadesign will make it nicer! :)
PrestaShop’s new theme first
One of the main projects of PrestaShop 1.7 was to redo everything about the front office. Since we broke backward compatibility and rewrote so much of the way things work, we focused on this part in the documentation first, explaining what’s different and how you need to adapt your code.
Of course more content is coming soon! Here is a list of what we intend to write soon:
- New hooks for carrier and product page.
- The best way to upgrade a (front) module from 1.6 to 1.7.
- Why and how to use theme template in modules.
- How to prepare a zip to release your theme.
Much more will follow, and even more if you create GitHub Issues!
Final words: Ask before hacking
Sometimes when you develop with PrestaShop, you want to override something or change some behavior and you don’t know how to do it. There is a pretty good chance that you’re not the only one trying to do this.
Even if you find a hack to do it and it works for you, please open a GitHub issue so we can either document a nice way to do it (if possible) or maybe think about turning it into a Core pull request for a next release of PrestaShop, so that the whole community can benefit from it!
We hope you’ll enjoy it and we are waiting for your feedbacks. Join the community on Gitter to discuss it with us :)