Philatelicos Posted September 10, 2019 Share Posted September 10, 2019 Hola a todos, Tengo Prestashop 1.7.6 configurado con dos decimales. Esto lo respeta con el precio normal. Pero si le aplico un descuento en %, el precio resultante me lo mestra con cuatro decimales. He intentado modificar product-prices-tpl: <div class="current-price"> <span itemprop="price" content="{$product.price_amount}">{$product.price}</span> cambiandolo por: <div class="current-price"> <span itemprop="price" content="{$product.price_amount}">{round($product.price, 2)}</span> Pero entonces sólo muestra el número entero, sin decimales. Y de lo que se trata es que muestre los dos decimales. adjunto captura de pantalla Saludos y gracias. Link to comment Share on other sites More sharing options...
Philatelicos Posted September 11, 2019 Author Share Posted September 11, 2019 Solucionado. He cambiado en el tpl: <div class="current-price"> <span itemprop="price" content="{$product.price_amount}">{$product.price}</span> por: <div class="current-price"> <span itemprop="price" content="{$product.price_amount}">{Tools::displayPrice(round($product.price_amount, 2))}</span> Gracias, 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