jfpm Posted May 26, 2015 Share Posted May 26, 2015 Bonjour, j'aimerai afficher le poids sur la fiche article j'ai écris ce code, mais j'obtient 0.500000 Kg à la place de 0.5 kg comment faire pour supprimer les 0.000000 derrière ? Cordialement <!-- products weight --> <p>Poids : <span id="product_weight">{$product->weight}</span> {$weightUnit}kg</p> Link to comment Share on other sites More sharing options...
jfpm Posted May 26, 2015 Author Share Posted May 26, 2015 Bonsoir avez vous une solution http://bibace.fr/shop/fr/punchs-rhums/3-arrange-gingembre-citron.html Link to comment Share on other sites More sharing options...
Julien64 Posted May 28, 2015 Share Posted May 28, 2015 Bonjour, Vous pouvez formater l'affichage en smarty pour ne garder que 2 chiffres après la virgule: {$product->weight|string_format:"%.2f"} 1 Link to comment Share on other sites More sharing options...
jfpm Posted October 3, 2015 Author Share Posted October 3, 2015 avec un peut de retard, je viens de tester sur 1.6.09 ça fonctionne merci 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