I want to remove the decimals of our price only on the list and product view. For example I want to change the price from $14,00 to $14,-
In the checkout, e-mails and PDF I want to keep the decimals for the tax.
How can I easily fix this?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
If it's only on those specific places the easiest (not the prettiest) way to do it with a replace in the
$price = ...; $price = str_replace(',00', ',-', $price);
Another option would be to have a custom extension that rewrites the
formatPrice method but since it's only visual that might be overkill.
<?php echo $_coreHelper->formatPrice($_price, true) ?>
<?php $_price = str_replace(',00', ',-', $_price); ?> <?php echo $_coreHelper->formatPrice($_price, true) ?>