This topic is locked

How to change Currency

12/19/2008 5:01:25 AM
PHPRunner General questions
N
n0rmaaln3 author

Hi,

How to change currency format? Ex. there site is "$" but i dont need this, how can i remove this?
And currency is "USD", "EUR" etc, but i want use only one currency, delete others and add new one, ex. "XXX", so the price will show "99 XXX.-" not "$99 USD".
And how i can put "%" to price, ex. i enter price "99" and then site calculates "99*1,1%=108,90" and then prints new and correct price "108,90.- XXX"
So, whatever you location is, currency is allways same (".- XXX").

What files needs to be edit and what codes needs to use?
Sorry for my bad english language, havent spoken this long long time.
Thanks a lot!

J
Jane 12/19/2008

Hi,
set up this field as custom on the "View as" settings dialog on the Visual Editor tab.

Here is a sample:

$value = $value*1.1;

$value = $value."- XXX";

N
n0rmaaln3 author 12/19/2008

Oo, this is working.

Thanks for quick response!
But one question more.

How can i do this.

Price is

202.0986.- XXX

but i want

202.- XXX

or better

205.- XXX

To round numbers to 5, 10(ex. 205, 310, 550)
Thanks!

N
n0rmaaln3 author 12/22/2008

Anyone?

Trial will exipire, i need to test things, if they work how i want, then i now i can order.

Soz for double post.

J
Jane 12/22/2008

Hi,
here is a sample:

$value = round($value*1.1);

$value = $value."- XXX";



More info here:

http://php.net/manual/en/ref.math.php