Jump to content

can't see hooked module


Recommended Posts

Hello,

 

When I use a LeftColumn hook everything is ok but I can't see my module when I use displayRightColumnProduct or displayProductTab or displayProductTabContent hook. 

<?php
if (!defined('_PS_VERSION_'))
  exit;
 
class Calc extends Module
  {
  public function __construct()
    {
    $this->name = 'calc';
    $this->tab = 'Test';
    $this->version = 1.0;
    $this->author = 'm4dmike';
    $this->need_instance = 0;
 
    parent::__construct();
 
    $this->displayName = $this->l('Calc');
    $this->description = $this->l('Calc');
    }
 
  public function install()
  {
  if (parent::install() == false OR !$this->registerHook('rightColumnProduct'))
    return false;
  return true;
  }
  
  public function uninstall()
  {
  if (!parent::uninstall())
    Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'calc`');
  parent::uninstall();
  }

  public function hookRightColumnProduct( $params )
  {
  global $smarty;
  return $this->display(__FILE__,'calc.tpl');
  }

public function hookLeftColumnProduct($params)
  {
  return $this->hookRightColumnProduct($params);
  }
  }
?>
Edited by m4dmike (see edit history)
Link to comment
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...