Jump to content

Recommended Posts

O código que estou usando é este:

 

<?php
if (!defined('_PS_VERSION_'))
    exit;
 
class psHomeTabs extends Module
{
     
    public function __construct()
    {
        $this->name = 'pshometabs';
        $this->tab = 'front_office_features';
        $this->version = '1.0';
        $this->author = 'Nemo';
        $this->need_instance = 0;
 
        parent::__construct();
 
        $this->displayName = $this->l('PS new homepage tabs');
        $this->description = $this->l('Adds a new block to the homepage tabs.');
        $this->confirmUninstall = $this->l('Are you sure you want to delete this module?');
    }
     
    public function install()
{
    if (!parent::install() OR
        !$this->registerHook('displayHomeTab') OR
        !$this->registerHook('displayHomeTabContent'))
        return false;
    return true;
}
    
    public function hookDisplayHomeTab($params)
{
    return $this->display(__FILE__, 'tab.tpl');
}
 
public function hookDisplayHomeTabContent($params)
{
    return $this->display(__FILE__, 'tab_content.tpl');
}
     
}
 
 
Existe algo de errado com ele? Teoricamente, o nome 'pshometabs' deveria aparecer na lista de módulos não instalados, certo?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More