phaso Posted May 12, 2011 Share Posted May 12, 2011 Hello,j'ai suivi le tutoriel liens :Téléchargez la Documentation Technique pour PrestaShop pages: http://www.prestashop.com/fr/downloads/je ne vois pas mon module ni ds le back & front office. merci d'avance .. Link to comment Share on other sites More sharing options...
AngelDisc Posted May 13, 2011 Share Posted May 13, 2011 Mets un bout de code pour t'aider .... Link to comment Share on other sites More sharing options...
Atch Posted May 13, 2011 Share Posted May 13, 2011 Si ça peut te rassurer, Nous non Plus on ne le voit pas...V++Atch Link to comment Share on other sites More sharing options...
phaso Posted May 13, 2011 Author Share Posted May 13, 2011 slt, voici le fichier monmodule.php:<?php<?php class MyModule extends Module { public function __construct() { $this->name = 'mymodule'; $this->tab = 'Test'; $this->version = 1.0; parent::__construct(); $this->displayName = $this->l('My module'); $this->description = $this->l('Description of my module.'); } public function install() { if(parent::install() == false) return false; return true; }public function install() {if(parent::install() == false) return false; return true; } public function uninstall() { Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'block_cms` WHERE `id_block` ='.intval($this->id)); parent::uninstall(); }} ?>le fichier monmodule.tpl est pour le moment vide..!! Link to comment Share on other sites More sharing options...
Vincent Decaux Posted May 13, 2011 Share Posted May 13, 2011 Soit : <?php <?php class MyModule extends Module { public function __construct() { $this->name = ‘mymodule’; $this->tab = ‘Test’; $this->version = 1.0; parent::__construct(); $this->displayName = $this->l(‘My module’); $this->description = $this->l(‘Description of my module.’); } public function install() { if(parent::install() == false) return false; return true; } public function install() { if(parent::install() == false) return false; return true; } public function uninstall() { Db::getInstance()->Execute(‘DELETE FROM `’.DB_PREFIX.‘block_cms` WHERE `id_block` =’.intval($this->id)); parent::uninstall(); } } ?> Tu as 2 <?php et 2 fonctions Install(), c'est une erreur de copié / collé ? Link to comment Share on other sites More sharing options...
phaso Posted May 13, 2011 Author Share Posted May 13, 2011 oui desolé: <?phpclass MyModule extends Module { public function __construct() { $this->name = 'mymodule'; $this->tab = 'Test'; $this->version = 1.0; parent::__construct(); $this->displayName = $this->l('My module'); $this->description = $this->l('Description of my module.'); } public function install() {if(parent::install() == false) return false; return true; } public function uninstall() { Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'block_cms` WHERE `id_block` ='.intval($this->id)); parent::uninstall(); }} ?> Link to comment Share on other sites More sharing options...
Captain FLAM Posted May 13, 2011 Share Posted May 13, 2011 Tiens, voilà le contenu du module blockinfos dont tu peux t'inspirer : class BlockInfos extends Module { private $_html; public function __construct() { $this->name = 'blockinfos'; $this->tab = 'Blocks'; $this->version = 1.1; parent::__construct(); $this->displayName = $this->l('Info block'); $this->description = $this->l('Adds a block with several information links'); } public function install() { if (!parent::install() OR !$this->registerHook('leftColumn')) return false; Db::getInstance()->Execute(' INSERT INTO `'._DB_PREFIX_.'block_cms`(`id_block`, `id_cms`) VALUES ('.intval($this->id).', 1), ('.intval($this->id).', 2), ('.intval($this->id).', 3), ('.intval($this->id).', 4)'); return true; } public function uninstall() { Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'block_cms` WHERE `id_block` ='.intval($this->id)); return parent::uninstall(); } Link to comment Share on other sites More sharing options...
phaso Posted May 13, 2011 Author Share Posted May 13, 2011 y'a pas une grande difference entre nos 2 codes... y'a t il d'autre modif à faire ds d'otre fichier ? Link to comment Share on other sites More sharing options...
Captain FLAM Posted May 13, 2011 Share Posted May 13, 2011 Tiens, voilà le contenu du module blockinfos dont tu peux t'inspirer Ce module, tu l'as dans PS 1.3Jettes-y un oeil Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now