ChanMing Posted September 18, 2010 Share Posted September 18, 2010 hello all..I'm using PS 1.3.1How to add new tab in BO? And, can new tab included some modules?Thanks. Link to comment Share on other sites More sharing options...
Yann - Prestaplugins Posted September 18, 2010 Share Posted September 18, 2010 Programmaticaly : $tab = new Tab(); foreach (Language::getLanguages() as $language) { $tab->name[$language['id_lang']] = 'My Tab'; } $tab->class_name = 'myTab'; // example, if you make a class myTab.php displaying your new tab content $tab->module = 'your module name'; $tab->id_parent = 0; // to make a new tab, else id of father's tab if(!$tab->save()) { return false; } Or simply go to Tools -> Tabs, and make your new tab manually. Link to comment Share on other sites More sharing options...
ChanMing Posted September 18, 2010 Author Share Posted September 18, 2010 Thanks, Programmaticaly : $tab = new Tab(); foreach (Language::getLanguages() as $language) { $tab->name[$language['id_lang']] = 'My Tab'; } $tab->class_name = 'myTab'; // example, if you make a class myTab.php displaying your new tab content $tab->module = 'your module name'; $tab->id_parent = 0; // to make a new tab, else id of father's tab if(!$tab->save()) { return false; } Where do I have to save it? and named what ...php?Or simply go to Tools -> Tabs, and make your new tab manually.Done, but when I add new tab, then click the tab that already added, contain said "Tab does not exist". Where do I have to input the contain? Thanks again, Link to comment Share on other sites More sharing options...
Yann - Prestaplugins Posted September 19, 2010 Share Posted September 19, 2010 Ok, you need complete tutorial, so look at this : http://www.julien-breux.com/2009/08/22/tutoriel-prestashop-creer-un-module-avec-onglet/ Link to comment Share on other sites More sharing options...
ChanMing Posted September 20, 2010 Author Share Posted September 20, 2010 I have created a tab called "atur", and I want it contains some payment modules. So what the script in AdminAtur.php ?Thanks, Link to comment Share on other sites More sharing options...
Recommended Posts