catalin.pop Posted November 24, 2016 Share Posted November 24, 2016 (edited) Hello. I'm trying to port my PS1.6 module to PS1.7 My module is blocked by this code line: class AdminMymoduleController extends ModuleAdminController { ... public function __construct() { $this->meta_title = $this->l('whatever'); } If I remove the $this->l('whatever') $this->meta_title = 'whatever'; It works. Has something changed or is this a bug? Edited November 24, 2016 by catalin.pop (see edit history) Link to comment Share on other sites More sharing options...
Caleydon Posted November 25, 2016 Share Posted November 25, 2016 did you trying? $this->trans('whatever', array(), 'Modules.Modulename.Admin') Read more on: http://developers.prestashop.com/module/05-CreatingAPrestaShop17Module/06-ModuleTranslation.html Link to comment Share on other sites More sharing options...
catalin.pop Posted November 25, 2016 Author Share Posted November 25, 2016 Yes. I saw that too. Same effect. The funny thing is that in the same class I have public function initToolBarTitle() { $this->toolbar_title[] = $this->l('Toolbar title'); } And it's working did you trying? $this->trans('whatever', array(), 'Modules.Modulename.Admin') Read more on: http://developers.prestashop.com/module/05-CreatingAPrestaShop17Module/06-ModuleTranslation.html Link to comment Share on other sites More sharing options...
bellini13 Posted November 25, 2016 Share Posted November 25, 2016 what exactly do you mean by 'blocks module'? Is there a specific error you are receiving? Also, in the future do not say 1.7, there are already 6 different versions, so be more specific. function l still exists in the AdminController class, so you can still use it. maybe you can't use it on the __construct function Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now