Eleer
Eleer

Reputation: 608

How does prestashop display modules

my quest is to swap position of 2 modules in left column. I read that normally I should do this in administration panel -> live edit The problem is that prestashop used by this web was little bit edited, some modules were deleted, so live edit does not work.

In code i found, that both modules are displayed from variable $HOOK_LEFT_COLUMN Front controller assignes to this variable following data:

'HOOK_LEFT_COLUMN' => ($this->display_column_left ? Hook::exec('displayLeftColumn') : ''),

I found that this gets from database names of modules, unfortunatelly I do not have access into the database :-( I was also searching in both modules and did not find that one includes another one.

So my question is: Does prestashop call modules in order they are set in database or is there any other way I can swap their positions.

Thank you for your answers.

Upvotes: 0

Views: 360

Answers (2)

unloco
unloco

Reputation: 7320

In your BackOffice go to Modules > Positions, search for displayLeftColumn and easily move the desired module up or down the hook

Upvotes: 2

Raphaël Malié
Raphaël Malié

Reputation: 4002

In the hook_module table, you have a position field. This field is used to sort modules for a specific hook.

Upvotes: 0

Related Questions