miiidooo-19 Posted May 11, 2012 Share Posted May 11, 2012 bonjour, j'ai suivi les démarche de doc pour créer un nouveau module http://doc.prestashop.com/pages/viewpage.action?pageId=3801216 tous à lair d'aller bien jusqu'au moment ou je veux afficher le contenu de module dans ma boutique mais rien qui apparice je me suis bloqué enfait dans la partie Affiche du contenu Link to comment Share on other sites More sharing options...
coeos.pro Posted May 11, 2012 Share Posted May 11, 2012 il faudrait que tu mettes le code que tu as créé, on pourrait t'aidé sur les erreurs commises Link to comment Share on other sites More sharing options...
miiidooo-19 Posted May 11, 2012 Author Share Posted May 11, 2012 (edited) ok voici le code de mon fichier freeblock.php <?php if (!defined('_PS_VERSION_')) exit; class FreeBlock extends Module { public function __construct() { $this->name = 'freeblock'; $this->tab = 'Test'; $this->version = 1.0; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('free block'); $this->description = $this->l('block libre.'); } public function install() { if (parent::install() == false OR !$this->registerHook('leftColumn')) return false; return true; } public function hookLeftColumn($params) { global $smarty; return $this->display(__FILE__,'freeblock.tpl'); } public function hookRightColumn($params) { return $this->hookLeftColumn($params); } } ?> et voici le code de fichier freeblock.tpl <!-- Block freeblock --> <div id="freeblock_block_left" class="block"> <h4>Welcome!</h4> <div class="block_content"> <ul> <li><a href="#" title="Click this link">Click me!</a></li> </ul> </div> </div> <!-- /Block freeblock --> Edited May 11, 2012 by miiidooo-19 (see edit history) Link to comment Share on other sites More sharing options...
Patric Posted May 11, 2012 Share Posted May 11, 2012 Bonjour, Topic déplacé dans la section "Développement". Merci de poster dans les bonnes sections sous peine de fermeture des topics. Link to comment Share on other sites More sharing options...
coeos.pro Posted May 11, 2012 Share Posted May 11, 2012 rajoute une fonction uninstall : public function uninstall() { if (parent::uninstall() == False) return False; return True; } désinstalle le module et réinstalle le, tu as peut être fait des modifications après installation, par exemple si tu rajoutes registerHook('leftColumn') après l'installation le module n'est pas greffé pour autant, il faut soit le greffer soit même, soit désinstaller et réinstallé ensuite. Link to comment Share on other sites More sharing options...
miiidooo-19 Posted May 11, 2012 Author Share Posted May 11, 2012 j'ai refait ce que tu m'as demandé et quand je le re instale et dans module->position-> Greffer un module je choisi le module et je met Greffer le module sur: left column bloks il la s'affiche le message d'erreur suivant ce module est déjà greffé sur ce hook mais rien qui s'affiche ds la boutique Link to comment Share on other sites More sharing options...
coeos.pro Posted May 11, 2012 Share Posted May 11, 2012 j'ai refait ce que tu m'as demandé et quand je le re instale et dans module->position-> Greffer un module je choisi le module et je met Greffer le module sur: left column bloks il la s'affiche le message d'erreur suivant ce module est déjà greffé sur ce hook mais rien qui s'affiche ds la boutique il faut réinstaller OU greffer, faire les 2 est normalement inutile et le message "ce module est déjà greffé sur ce hook" est logiquement affiché Tu est en local ? sur quel version de prestashop ? Link to comment Share on other sites More sharing options...
miiidooo-19 Posted May 11, 2012 Author Share Posted May 11, 2012 non je suis pas en local et j'utilise la version 1.4 Link to comment Share on other sites More sharing options...
coeos.pro Posted May 11, 2012 Share Posted May 11, 2012 donc tu as une url... sinon supprime if (!defined('_PS_VERSION_')) exit; Link to comment Share on other sites More sharing options...
miiidooo-19 Posted May 11, 2012 Author Share Posted May 11, 2012 j'ai supprimé if (!defined('_PS_VERSION_')) exit; mais toujours rien 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