user3279494
user3279494

Reputation: 451

Override replace module tpl file

I can't override a template module tpl on prestashop. I have put my new tpl file in theme/module, try in override prestashop folder, no work. Clear cache no change.

Upvotes: 2

Views: 3557

Answers (2)

Pol Rué
Pol Rué

Reputation: 354

To override a module tpl you have to copy the folder structure and the file you want to override into your theme.

For example if you want to modify the front.tpl of the module modulename and you have a theme called yourthemename

you will have to copy:

/modules/modulename/views/templates/hook/front.tpl

to

/themes/yourthemename/modules/modulename/views/templates/hook/front.tpl

Note that the folders may vary but you have to keep the structure.

Once the file is copied you can edit it and it will replace the contents of the tpl

Upvotes: 6

defuzed
defuzed

Reputation: 568

Template overrides for PS Modules (for 1.6 and 1.7) belong in the themes/[YOUR_THEME]/modules/ directory.

Now depending on the module you're trying to override, you might, or might not, need to create additional subdirectories like views/templates/front or views/templates/hook. Just look at the location of the original module tpl file to get the exact path.

Upvotes: 0

Related Questions