07-27-2023, 12:19 AM
I'm developing a module for prestashop 1.5.3. I need to create a custom admin tab during the module installation. I make the install like this
public function install()
{
if( (parent::install() == false)||(!$this->_createTab()) )
return false;
return true;
}
And the _createTab method is:
private function _createTab()
{
$tab = new Tab();
$tab->id_parent = 7; // Modules tab
$tab->class_name='AdminWarranty';
$tab->module='fruitwarranty';
$tab->name[(int)(Configuration::get('PS_LANG_DEFAULT'))] = $this->l('Warranty');
$tab->active=1;
if(!$tab->save()) return false;
return true;
}
And nothing happens.. What am I doing wrong.. and where to find good prestashop developer reference.?
public function install()
{
if( (parent::install() == false)||(!$this->_createTab()) )
return false;
return true;
}
And the _createTab method is:
private function _createTab()
{
$tab = new Tab();
$tab->id_parent = 7; // Modules tab
$tab->class_name='AdminWarranty';
$tab->module='fruitwarranty';
$tab->name[(int)(Configuration::get('PS_LANG_DEFAULT'))] = $this->l('Warranty');
$tab->active=1;
if(!$tab->save()) return false;
return true;
}
And nothing happens.. What am I doing wrong.. and where to find good prestashop developer reference.?