-1

I'm using prestashop 1.6 and one module is not editable in SEO&URL, to change is meta. Actually, i have the default pretashop meta title. How can i add a custom header.tpl for this module ?

Thank you for your help

Tony

toto
  • 3
  • 2

1 Answers1

1

Assuming you are talking about a module with a controller,
you can add in the base file /modules/mymodule/mymodule.php,
inside the method __construct(),
a object like this $this->controllers = array('controller_file_name');, where the controller_file_name is the file which generate the page in the front office.

Once made this, you will need to re-install the module and this added object will generate a new page in the SEO&URL where you could change all the metas (title, description and keywords).

You can see some examples of this modules in the bankwire, cheque and blocknewsletter.

Rolige
  • 993
  • 8
  • 10
  • Thank you for your help, but I can't re-install this module, (video module) i'll lose all my data and config... – toto Aug 08 '18 at 20:36
  • I understand, you can force the page creation with this [code](https://codeshare.io/5MyzjR), assuming you have the object `$this->controllers`, just need execute that code once time. – Rolige Aug 08 '18 at 23:00
  • I add the code in mymodule.php, and re-install the module I have now the module in the section seo & url. I change the meta, but when the page module is loading, i can see the new meta title in the browser for a second, and it change for the default title meta (shop name).. – toto Aug 10 '18 at 23:45
  • Maybe you have changed something in other place, if you restore the code you have changed should works correctly. – Rolige Aug 11 '18 at 01:02