Le-cathare Posted December 22, 2010 Share Posted December 22, 2010 Est t'il possible de mettre ce block au dessus des produits phare tout en le gardant sur le coté droit. J'ai testé de le gréffé sur cette partit mais le block n'apparait pas Link to comment Share on other sites More sharing options...
Le-cathare Posted December 23, 2010 Author Share Posted December 23, 2010 Personne pour m'aider :down: Link to comment Share on other sites More sharing options...
Le-cathare Posted December 28, 2010 Author Share Posted December 28, 2010 cela n'est pas possible ? Link to comment Share on other sites More sharing options...
Jacques Biais Posted December 28, 2010 Share Posted December 28, 2010 Bonsoir,Un module ne peut pas être affiché en même temps à des endroits différents ( enfin cela me semble logique puisqu'il contient des informations d'installation à un endroit précis).La seule solution est de dupliquer le module (TPL et PHP etc) de changer son nom et de modifier le php afin de le faire installer ou tu souhaites.Regardes bien le module original et cherches à comprendre le code, cela t'aidera pour faire un nouveau module qui s'installera ou tu le souhaites. Link to comment Share on other sites More sharing options...
marty69 Posted December 29, 2010 Share Posted December 29, 2010 Bonjour,Ce module n'est pas prévu à la base pour une greffe en page d'accueil.Pour l'autoriser il faut modifier le fichier /blockspecials/blockspecials.phpen fin de fichier essayez de rajouter : function hookhome($params) { return $this->hookRightColumn($params); } Au besoin désinstaller et réinstaller le module en back-office après modification. Link to comment Share on other sites More sharing options...
Jacques Biais Posted December 29, 2010 Share Posted December 29, 2010 Il souhaite l'afficher dans la page centrale au dessus des produits phare et en même temps dans la colonne de droite.Donc refaire le module sous un autre nom pour affichage au centre. Link to comment Share on other sites More sharing options...
marty69 Posted December 29, 2010 Share Posted December 29, 2010 Ca ne me semble pas incompatible... Link to comment Share on other sites More sharing options...
Le-cathare Posted December 29, 2010 Author Share Posted December 29, 2010 je le rajoute ou exactement dans le fichier ? Link to comment Share on other sites More sharing options...
marty69 Posted December 29, 2010 Share Posted December 29, 2010 En fin de fichier, juste après : function hookLeftColumn($params) { return $this->hookRightColumn($params); } Link to comment Share on other sites More sharing options...
Le-cathare Posted December 29, 2010 Author Share Posted December 29, 2010 J'ai pas cela dans mon fichierVoici ce qui ce trouve<!-- MODULE Block specials --> {l s='Specials' mod='blockspecials'} {if $special} getImageLink($special.link_rewrite, $special.id_image, 'medium')}" alt="{$special.legend|escape:html:'UTF-8'}" height="{$mediumSize.height}" width="{$mediumSize.width}" title="{$special.name|escape:html:'UTF-8'}" /> {$special.name|escape:html:'UTF-8'} {if !$priceDisplay}{displayWtPrice p=$special.price_without_reduction}{else}{displayWtPrice p=$priceWithoutReduction_tax_excl}{/if} {if $special.reduction_percent}(-{$special.reduction_percent}%){/if}{if !$priceDisplay}{displayWtPrice p=$special.price}{else}{displayWtPrice p=$special.price_tax_exc}{/if} {l s='All specials' mod='blockspecials'} {else}{l s='No specials at this time' mod='blockspecials'} {/if} <!-- /MODULE Block specials --> Link to comment Share on other sites More sharing options...
marty69 Posted December 29, 2010 Share Posted December 29, 2010 ça c'est le fichier blockspecials.tpl, je parle de blockspecials.php Link to comment Share on other sites More sharing options...
Le-cathare Posted December 29, 2010 Author Share Posted December 29, 2010 en effet. je vais faire le test. Link to comment Share on other sites More sharing options...
Le-cathare Posted December 29, 2010 Author Share Posted December 29, 2010 En effet je vais faire le test. Link to comment Share on other sites More sharing options...
Le-cathare Posted December 29, 2010 Author Share Posted December 29, 2010 Sa marche pas, j'ai bien le module sur la colonne de droite, le module est bien gréffé aussi sur la page d’accueil et il n’apparaît pas Link to comment Share on other sites More sharing options...
marty69 Posted December 29, 2010 Share Posted December 29, 2010 as tu désinstallé et réinstallé le module ? Link to comment Share on other sites More sharing options...
Le-cathare Posted December 29, 2010 Author Share Posted December 29, 2010 je les désinstaller via l'onglet module de prestashop. je les pas enlever du sever pour le remettre. Link to comment Share on other sites More sharing options...
marty69 Posted December 29, 2010 Share Posted December 29, 2010 C'est censé fonctionner.....as tu bien greffé le module en position "Homepage Content" ? Link to comment Share on other sites More sharing options...
Le-cathare Posted December 29, 2010 Author Share Posted December 29, 2010 oui il est bien gréffé. pour info c'est pas le module promotion d'origine de prestashop, c'est une autre module télécharger sur prestashop Module promotion caroussel Link to comment Share on other sites More sharing options...
Jacques Biais Posted December 29, 2010 Share Posted December 29, 2010 Pour l'afficher au centre c'est: registerHook('home') Link to comment Share on other sites More sharing options...
Le-cathare Posted December 29, 2010 Author Share Posted December 29, 2010 sa fonctionne toujours pas, voici mon fichier :<?phpif (!defined('_CAN_LOAD_FILES_')) exit;class BlockSpecials extends Module{ private $_html = ''; private $_postErrors = array(); function __construct() { $this->name = 'blockspecials'; $this->tab = 'Blocks'; $this->version = 0.8; parent::__construct(); $this->displayName = $this->l('Specials block'); $this->description = $this->l('Adds a block with current product Specials'); } function install() { return (parent::install() AND $this->registerHook('rightColumn')); } function hookRightColumn($params) { global $smarty; if ($special = Product::getRandomSpecial(intval($params['cookie']->id_lang))) $smarty->assign(array( 'special' => $special, 'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'] / (1 + $special['rate'] / 100), 2), 'oldPrice' => $special['price'] + $special['reduction'], 'mediumSize' => Image::getSize('medium'))); return $this->display(__FILE__, 'blockspecials.tpl'); } function hookLeftColumn($params) { return $this->hookRightColumn($params); } function hookhome($params) { return $this->registerHook($params); }}?> Link to comment Share on other sites More sharing options...
marty69 Posted December 29, 2010 Share Posted December 29, 2010 quand tu publies du code penses à mettre entre balises pour plus de lisibilité.pour info, mon blockspecials.php (qui fonctionne chez moi en 1.3.x) <?php if (!defined('_CAN_LOAD_FILES_')) exit; class BlockSpecials extends Module { private $_html = ''; private $_postErrors = array(); function __construct() { $this->name = 'blockspecials'; $this->tab = 'Blocks'; $this->version = 0.8; parent::__construct(); $this->displayName = $this->l('Specials block'); $this->description = $this->l('Adds a block with current product Specials'); } function install() { return (parent::install() AND $this->registerHook('rightColumn')); } function hookRightColumn($params) { global $smarty; if ($special = Product::getRandomSpecial(intval($params['cookie']->id_lang))) $smarty->assign(array( 'special' => $special, 'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'] / (1 + $special['rate'] / 100), 2), 'oldPrice' => $special['price'] + $special['reduction'], 'mediumSize' => Image::getSize('medium'))); return $this->display(__FILE__, 'blockspecials.tpl'); } function hookLeftColumn($params) { return $this->hookRightColumn($params); } function hookhome($params) { return $this->hookRightColumn($params); } } ?> Link to comment Share on other sites More sharing options...
ceraed Posted February 15, 2011 Share Posted February 15, 2011 Bonjour,Je suis très novice dans le domaine et aimerait savoir comment on met un produit dans le bloc promo ou réduction.J'ai beau chercher, je ne trouve rienmerci d'avance pour votre aide 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