vlaforet Posted October 24, 2021 Share Posted October 24, 2021 Hi, I'm using Prestashop 1.6. For my custom module I need to add a new tab but I can't seem to make it work. The tab is displayed correctly the only issue is when I click on the link it tells me the controller is not found. I've read countless forum posts and open source code on github to try and find out why this is not working. My code seems to be pretty similar to other modules though... Here is my test admin controller: <?php class AdminJournalCustomizationController extends ModuleAdminController { public function __construct() { parent::__construct(); $this->bootstrap = true; $this->id_lang = $this->context->language->id; $this->default_form_language = $this->context->language->id; } public function initContent() { parent::initContent(); } } And how I declare my tab: public function installTab() { $tab = new Tab(); $tab->active = 1; $tab->class_name = 'AdminJournalCustomization'; $tab->name = array(); foreach (Language::getLanguages(true) as $lang) { $tab->name[$lang['id_lang']] = 'Journal Customization'; } $tab->id_parent = 0; $tab->module = $this->name; return $tab->add(); } Thanks Link to comment Share on other sites More sharing options...
vlaforet Posted November 13, 2021 Author Share Posted November 13, 2021 Hi, I found the issue. The name of my module had an uppercase letter and that prevented the tab to load the controller class. Hope that helps someone 1 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