Child pages
  • Contributing code to PrestaShop

Versions Compared

Key

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

...

If you have never used Git or Github, read the following instructions.

 

Forking PrestaShop

In order to make changes to PrestaShop's code, you first need to create a fork of PrestaShop within Github.

...

  1. From your fork of PrestaShop, reach the file you intend to edit by clicking through the various folders.
  2. Once the file opened on the screen, four buttons appear at the top of the source code: "Edit", "Raw", "Blame" and "History". Click "Edit".
  3. This opens the file in an online editor. Now you can make your changes directly in that editor.
  4. Once your are done with writing your changes, click the "Preview" button: this will display the file's "diff", which is the difference between your file and the original file. Take the time to check that there is nothing wrong.
  5. Save the file by clicking on the "Commit Changes" button. Do not forget to give it a commit summary and, if needed, an extended description of what your file brings to PrestaShop. This is essential as the PrestaShop developer will use it to get the context of your changes, and therefore to decide whether it should be added to PrestaShop or not.
  6. Now the file is saved on your own fork of PrestaShop. You have to submit that

You can also easily create a new file directly on Github:

...

Note

Make sure that you are always making changes to the latest version of the original repository. This means that the "Branch" button above the list of file should read "branch: development", and not "branch: master".

The development branch is the one where all current works are pushed to.
The master branch is a snapshot of the development branch which was used to build the previous stable version of PrestaShop.
The release branch is the forthcoming stable version.
Others branches are for specific current projects, and should not be touched.

Sending your file for inclusion in PrestaShop

Until now, all you have done is work locally – or at least, in your own repository in Github. If you keep it that way, the PrestaShop developers will never know that you did anything here. You must send your work to them.

This means installing a tool to retrieve the PrestaShop code from Github, edit it at will on your machine, and send your changes back on PrestaShop's Github. The easiest way to achieve this is to install TortoiseGit