Jean-Bruno Posted October 30, 2008 Share Posted October 30, 2008 Bonjour à tousJ'aimerais essayé de n'afficher mes prix que si l'internaute s'est connecter et identifié (en gros qu'il a accès à la rubrique "mon compte") Il y a un fil un peu similaire qui donnait une piste mais je ne vois pas en pratique comment procédé.http://www.prestashop.com/forums/viewthread/4016/Il me semblait aussi avoir vu une case à cocher "affiché les prix". J'ai révé ?En vous remerciant Link to comment Share on other sites More sharing options...
hairvay Posted October 30, 2008 Share Posted October 30, 2008 Bonjour,comme indiqué dans la réponse de Pierre Yves, tu dois utiliser ce bout de code dans la page product.tpl.Si tu utilises le template de base, recherche la partie suivante : {if $product->on_sale} {l s='On sale!'} {elseif ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product->reduction_from))} {l s='Price lowered!'} {/if} {convertPrice price=$product->getPrice(true, NULL, 2)} {if $product->getPrice(true, NULL, 2) != $product->getPrice(false, NULL, 2)}{l s='incl. tax'}{/if} {if $displayPreTax AND $display_ht AND $product->id_tax} {l s='('}{convertPrice price=$product->getPrice(false, NULL, 2)} {l s='tax not incl.)'} {/if} {if ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product->reduction_from))} {convertPrice price=$product->getPriceWithoutReduct()} {l s='incl. tax'} {/if} {if $product->reduction_percent != 0 && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product->reduction_from))} {l s='(price reduced by'} {$product->reduction_percent|floatval} %{l s=')'} {/if} {if $product->ecotax != 0} {l s='include'} {convertPrice price=$product->ecotax} {l s='for green tax'} {/if} pour la remplacer par ceci : {if $logged == true} {if $product->on_sale} {l s='On sale!'} {elseif ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product->reduction_from))} {l s='Price lowered!'} {/if} {convertPrice price=$product->getPrice(true, NULL, 2)} {if $product->getPrice(true, NULL, 2) != $product->getPrice(false, NULL, 2)}{l s='incl. tax'}{/if} {if $displayPreTax AND $display_ht AND $product->id_tax} {l s='('}{convertPrice price=$product->getPrice(false, NULL, 2)} {l s='tax not incl.)'} {/if} {if ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product->reduction_from))} {convertPrice price=$product->getPriceWithoutReduct()} {l s='incl. tax'} {/if} {if $product->reduction_percent != 0 && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product->reduction_from))} {l s='(price reduced by'} {$product->reduction_percent|floatval} %{l s=')'} {/if} {if $product->ecotax != 0} {l s='include'} {convertPrice price=$product->ecotax} {l s='for green tax'} {/if} {else}{l s='Please log in to see our prices'}{/if} répète l'opération pour les autres pages de ton template où sont afficher les prix.@+ Link to comment Share on other sites More sharing options...
Jean-Bruno Posted October 30, 2008 Author Share Posted October 30, 2008 merci hairwayJ'essaye et je met [résolu] ;-) 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