3.4 How to work with modules and hooks in Prestashop

Prestashop is made out of core software containing: PHP, HTML, CSS, Javascript, jQuery and so on. If you make any changes to this core software it will be lost when updating Prestashop. So they make use of hooks. These hooks are placed almost everywhere you can even make your own if you want. On these hooks you can hang modules. You can use third party modules, you can even build your own if you know how to use PHP, HTML and so on.

How change a modules hook in Prestashop the old fashioned way

To show you how to change a modules hook (position) we will change the position of the shopping cart from right to left. First we will do it the old fashion way and later on we will use Prestashop’s new wysiwyg (what you see is what you get) editor.

  1. Go to your back-end;
  2. Go to the Modules tab;
  3. And go to Positions;

Now the right column blocks consist of the following:

Prestashop right column blocksNow lets move the shopping cart from the right to the left column block

  1. Delete the shopping cart block;
  2. It should say: “Module removed successfully from hook“;
  3. Now click Transplant a module;
  4. For module choose Cart block;
  5. For hook into choose Left column blocks;
  6. Now your Left column should look as followed:

Prestashop cart block left columnHow to change module positioning in Prestashop the old fashioned way

To change the positioning of your module you can click on the arrows next to there names keep clicking the arrow until your satisfied.

How to use Prestashop LiveEdit to change module positioning

I think we all realize that this way is very old fashioned and if you have to change a lot of modules for instance when you’re installing a new theme this isn’t easy.

Depending on your Prestashop version you should see a button called “Run LiveEdit” on the right. If you click on it you should see something as followed:

prestashop live edit

Now just move your modules where ever you want by dragging them. Once your done you just click save in the bottom left corner.


Tags: , ,

3 Responses to “3.4 How to work with modules and hooks in Prestashop”

  1. Niko Holmen May 26, 2012 at 7:43 am #

    I think other web site proprietors should take this site as an model, very clean and great user friendly style and design, as well as the content. You’re an expert at this stuff!

    • Thomas Barbillion May 26, 2012 at 8:19 am #

      Hi, Thank you very much. I will be writing new articles soon! so keep following this website or Twitter.

      Kind regards, T. Barbillion

  2. Tractor Tim July 14, 2012 at 3:46 pm #

    great page mate

Leave a Reply