HARVIE Posted October 6, 2009 Share Posted October 6, 2009 Bonjour,J'avais lancé une question sur ce forum: comment afficher le prix d'achat sur la fiche produit (que j'ai appelé moi prix catalogue)?Et en bidouillant j'ai trouvé comment faire avec ce code dans product.tpl (-> <!-- prices --> ) :<!-- Affichage du prix catalogue-->{if $product->wholesale_price}{l s='Prix catalogue: '}{$product->wholesale_price|escape:'htmlall':'UTF-8'} €HT{/if}Voilà seulement le prix est affiché avec 6 chiffres après la virgule. Et j'aimerais seulement en afficher 2. Quelqu'un sait-il comment modifier ça?Merci,Harvie Link to comment Share on other sites More sharing options...
jon21 Posted January 20, 2014 Share Posted January 20, 2014 Bon je déterre le topic mais ca pourrait peut etre servir à quelqu'un.. Pour ne mettre que 2 chiffres apres la virgule, rajoute cela à ta variable: |string_format:"%.2f" Ca donne : {$product->wholesale_price|escape:'htmlall':'UTF-8'|string_format:"%.2f" } 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