Jump to content

Module Tpl override


Recommended Posts



I was trying to override a tpl from a module. I followed documentation for prestashop 1.5 but does not work :




but as I can read in method setTemplate from ModuleFrontController :

public function setTemplate($template)
       if (Tools::file_exists_cache(_PS_THEME_DIR_.'modules/'.$this->module->name.'/'.$template))
           $this->template = _PS_THEME_DIR_.'modules/'.$this->module->name.'/'.$template;
       elseif (Tools::file_exists_cache($this->getTemplatePath().$template))
           $this->template = $this->getTemplatePath().$template;
           throw new PrestaShopException("Template '$template'' not found");


This method search theme/mytheme/modules/mymodule.tpl path but not the one in documentation.


All of this to say that sometime beware of RTFM :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...