Log in

View Full Version : Currency Display Issues



CustomPowerDesigns
02-17-2010, 12:07 AM
I need to display the currency on my website. Right now it will display the currency, but if the item is set at .02 it will just show 2c. I would like it to say $0.02 instead. How would I accomplish this?

This is my code in config.php

'currency' => 'USD',

And this is the price area for the auctions_controller.php

// Formating the price
$auction['Auction']['start_price'] = $number->currency($auction['Auction']['start_price'], $this->appConfigurations['currency']);
$auction['Auction']['savings']['price'] = $number->currency($auction['Auction']['savings']['price'], $this->appConfigurations['App.currency']);
$auction['Auction']['savings']['percentage'] = $number->toPercentage($auction['Auction']['savings']['percentage']);

Nile
02-17-2010, 12:28 AM
Can't you use the money_format function? http://us3.php.net/manual/en/function.money-format.php

CustomPowerDesigns
02-23-2010, 09:25 AM
No, I can't just use the money controller. Isn't there a way to set it in the Config File?