Nazar48 Posted October 15, 2015 Share Posted October 15, 2015 I saw here a lot of themes like mine,but i dont get how it work and how should i do. I am working on Import\Export module so i want to create tab in backoffice in top menu (Catalog,Orders,Clients...here) when module is installing,so i guess i need to write it in my function install() which will create page and tab for module,right? But how can i do it?i just dont get this system of prestashop. Link to comment Share on other sites More sharing options...
Prescol Posted October 15, 2015 Share Posted October 15, 2015 You need to create a new tab. On install add: $tab = New Tab(); $tab->id_parent = 0; // Parent tab, 0 if you want the first level $tab->class_name = 'AdminClassname'; //Name of the class $tab->active = 1; //Status $tab->module = $this->name; $tab->name[$this->context->language->id] = "Name for the tab"; $tab->add(); And in uninstall $tab=new Tab(Tab::getIdFromClassName('AdminClassname')); $tab->delete(); Link to comment Share on other sites More sharing options...
Nazar48 Posted October 15, 2015 Author Share Posted October 15, 2015 You need to create a new tab. On install add: $tab = New Tab(); $tab->id_parent = 0; // Parent tab, 0 if you want the first level $tab->class_name = 'AdminClassname'; //Name of the class $tab->active = 1; //Status $tab->module = $this->name; $tab->name[$this->context->language->id] = "Name for the tab"; $tab->add(); And in uninstall $tab=new Tab(Tab::getIdFromClassName('AdminClassname')); $tab->delete(); but should i create some controller,no?It didnt work,here is my code http://dpaste.com/321P9X6 Link to comment Share on other sites More sharing options...
Prescol Posted October 15, 2015 Share Posted October 15, 2015 Yes, you need create a ModuleAdminController, inside your module folder>controllers>admin 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