Hello,
i developed a module, but when installing i have it two times in hook and i also have to uninstall the same module two times ?
I used the standard install and uninstall function from guide:
public function install()
{
if (!parent::install() ||
!$this->installDB() ||
!$this->registerHook('header') ||
!$this->registerHook('displayProductButtons') ||
!Configuration::updateValue('PLM_NAME', 'tal2pl') ||
!Configuration::get('PS_LANG_DEFAULT')
)
return false;
return parent::install()
&& $this->registerHook('displayProductButtons')
&& $this->registerHook('header')
&& Configuration::updateValue('PLM_NAME', 'tal2pl')
&& Configuration::get('PS_LANG_DEFAULT');
}
public function uninstall()
{
if (!parent::uninstall() ||
!Configuration::deleteByName('PLM_NAME')
)
return false;
Configuration::deleteByName('PLM_NAME');
return parent::uninstall();
}