VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: rdcustom on May 23, 2024, 12:23:58 PM

Title: for those who wants to remove trailing zeros from prices
Post by: rdcustom on May 23, 2024, 12:23:58 PM
did a trick today, I post here for future reference in case of updates:

currencydisplay.php

on line 301

add:

$res = preg_replace('/\,00/', '', $res);
$res = rtrim($res, ",");

this will show prices without useless ",00"

125,00 will result in "125"
Title: Re: for those who wants to remove trailing zeros from prices
Post by: rdcustom on December 17, 2024, 21:15:52 PM
bump: can it be implemented please?
Title: Re: for those who wants to remove trailing zeros from prices
Post by: sirius on December 18, 2024, 10:40:29 AM
Good point,
but I think it's up to you to do an override for this in your template.
Because some of us also want this for example :
<span>79€<sup>00</sup></span>