Joan Albert Posted January 11, 2013 Share Posted January 11, 2013 (edited) He conseguido crear un módulo pero cuando le doy instalar me da FATAL ERROR. Alguien me puede indicar que hago mal....? Gràcias. <?php if (!defined('_PS_VERSION_')) exit; class mimoduloheader extends Module { private $_postErrors = array(); public function __construct() { $this->name = 'mimoduloheader.php'; $this->tab = 'front_office_features'; $this->version = 1.5; $this->author = 'Joan'; $this->need_instance = 1; $this->_directory = dirname(__FILE__).'/../../'; parent::__construct(); $this->displayName = $this->l('mimoduloheader'); $this->description = $this->l('Este es mi módulo - a ver si lo puedo terminar'); } public function install() { if (parent::install() == false OR !$this->registerHook('header')) return false; return true; } } ?> Edited January 11, 2013 by Joan Albert (see edit history) Link to comment Share on other sites More sharing options...
nadie Posted January 11, 2013 Share Posted January 11, 2013 He conseguido crear un módulo pero cuando le doy instalar me da FATAL ERROR. Alguien me puede indicar que hago mal....? Gràcias. <?php if (!defined('_PS_VERSION_')) exit; class mimoduloheader extends Module { private $_postErrors = array(); public function __construct() { $this->name = 'mimoduloheader.php'; $this->tab = 'front_office_features'; $this->version = 1.5; $this->author = 'Joan'; $this->need_instance = 1; $this->_directory = dirname(__FILE__).'/../../'; parent::__construct(); $this->displayName = $this->l('mimoduloheader'); $this->description = $this->l('Este es mi módulo - a ver si lo puedo terminar'); } public function install() { if (parent::install() == false OR !$this->registerHook('header')) return false; return true; } } ?> En todo caso asi: <?php if (!defined('_PS_VERSION_')) exit; class mimoduloheader extends Module { private $_postErrors = array(); public function __construct() { $this->name = 'mimoduloheader'; $this->tab = 'front_office_features'; $this->version = 1.5; $this->author = 'Joan'; $this->need_instance = 1; $this->_directory = dirname(__FILE__).'/../../'; parent::__construct(); $this->displayName = $this->l('mimoduloheader'); $this->description = $this->l('Este es mi módulo - a ver si lo puedo terminar'); } public function install() { if (parent::install() == false OR !$this->registerHook('header')) return false; return true; } } ?> Link to comment Share on other sites More sharing options...
Joan Albert Posted January 11, 2013 Author Share Posted January 11, 2013 Madre mia, perdona estoy despistado, muchas gracias !! Link to comment Share on other sites More sharing options...
nadie Posted January 11, 2013 Share Posted January 11, 2013 Vamos que cambies esto: $this->name = 'mimoduloheader.php'; Por esto: $this->name = 'mimoduloheader'; te por este mundo oscuro y tenebroso. Link to comment Share on other sites More sharing options...
nadie Posted January 11, 2013 Share Posted January 11, 2013 Madre mia, perdona estoy despistado, muchas gracias !! Un placer ayudarte y servirte! Si das el tema como solucionado, edita el titulo del tema, editando el primer mensaje, pulsando en editar, y después en "Usar editor completo", añadiendo la palabra "Solucionado" al titulo, esto ayudara, a mantener una mayor organización en el foro. Un saludo y recuerda que estaremos en el foro, para guiar Link to comment Share on other sites More sharing options...
nadie Posted January 11, 2013 Share Posted January 11, 2013 Tema movido a discusión general. Link to comment Share on other sites More sharing options...
Recommended Posts