Hello everyone,
I have a heavily customised virtuemart and I have issue with the total price in cart, here is the code I am using:
<td class="col-total" align="right"><?php $bse = $this->cart->pricesUnformatted['salesPrice'] ;
$sps = $this->cart->pricesUnformatted['salesPriceShipment'];
$spp = $this->cart->pricesUnformatted['salesPricePayment'];
$fsbs = ($bse + $sps + $spp);
echo $fsbs.',0 €';?>
</td>
and assume the total is 54,90 and the result shows 54.9,0
How can I make it look like 54,90
I look forward to your response.
Thank you
Adeola
Hi,
change
echo $fsbs.',0 €';?>
to
echo $fsbs.'0 €';?>
you have a comma for nothing
The thing is the site uses , as the decimal point and that is what I am trying to achieve. With the above the decimal point is . which I want to change to ,
Thank you for your help
echo number_format($fsbs,2,',','').'€';
It works like magic. Thank you very much
Quote from: GJC Web Design on August 28, 2015, 12:06:12 PM
echo number_format($fsbs,2,',','').'€';
Next time i read a little more the code ;)