alexper Posted August 26, 2016 Share Posted August 26, 2016 Bonjour J'aimerai afficher le module Promotions (blockspecials) dans le hook DisplayHome. J'ai créé un fichier ainsi : override/modules/blockspecials/blockspecials.php Contenant class BlockSpecialsOverride extends BlockSpecials { public function hookDisplayHome($params) { if (Configuration::get('PS_CATALOG_MODE')) return; if (!$this->isCached('blockspecials-home.tpl', $this->getCacheId('blockspecials-home'))) { $this->smarty->assign(array( 'specials' => BlockSpecials::$cache_specials, 'homeSize' => Image::getSize(ImageType::getFormatedName('home')) )); } if (BlockSpecials::$cache_specials === false) return false; return $this->display(__FILE__, 'blockspecials-home.tpl', $this->getCacheId('blockspecials-home')); } } Je me retrouve avec un message sur le front et l'admin de mon site, et le module en carafe.class BlockSpecialsOverride extends BlockSpecials { public function hookDisplayHome($params) { if (Configuration::get('PS_CATALOG_MODE')) return; if (!$this->isCached('blockspecials-home.tpl', $this->getCacheId('blockspecials-home'))) { $this->smarty->assign(array( 'specials' => BlockSpecials::$cache_specials, 'homeSize' => Image::getSize(ImageType::getFormatedName('home')) )); } if (BlockSpecials::$cache_specials === false) return false; return $this->display(__FILE__, 'blockspecials-home.tpl', $this->getCacheId('blockspecials-home')); } } Une idée ? Merci Link to comment Share on other sites More sharing options...
alexper Posted August 26, 2016 Author Share Posted August 26, 2016 J'ai honte.En envoyant ce message j'ai réalisé que j'avais oublié les balises <?php ?> dans mon fichier.... Bref, ça fonctionne. 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