17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 74698 Views |
-
Where to change currency from $ (dollar) prefix in ecommerce module

16 April 2008 at 7:55am
In the ecommerce module, where/how do i change the currency prefix from the $ symbol?
In fact I found it was here:
sapphire/core/model/fieldtypes/Currency.php
I removed all evidence of the dollar sign, as we have the GBP suffix anyway.
I changed mine to say this:
<code>
<?php
/**
* Currency value.
* Currency the currency class only supports single currencies.
*/
class Currency extends Decimal {
function Nice() {
// return "<span title=\"$this->value\">" . number_format($this->value, 2) . '</span>';
return number_format($this->value, 2);
}
function Whole() {
return number_format($this->value, 0);
}
function setValue($value) {
$this->value = ereg_replace('[^0-9.]+','', $value);
}
}?>
</code> -
Re: Where to change currency from $ (dollar) prefix in ecommerce module

17 April 2008 at 10:05am Last edited: 17 April 2008 10:05am
Thanks you are the very best i have search these Solution perhaps in the Checkout Page i have always a $ Sign
=========================
Please note: Your goods will not be dispatched until we receive your payment.
Amount$30.00 sFr.
=========================how can delete that?
Thanks Stooni-----------
-
Re: Where to change currency from $ (dollar) prefix in ecommerce module

20 April 2008 at 8:14am
find the 'Currency.php' file in the 'saphire/core/model/fieldtypes' folder:
Here you can see where I have replaced the '$' symbol with the GBP '£' symbol.class Currency extends Decimal {
function Nice() {
// return "<span title=\"$this->value\">$" . number_format($this->value, 2) . '</span>';
return '£' . number_format($this->value, 2);
}
function Whole() {
return '£' . number_format($this->value, 0);
}
function setValue($value) {
$this->value = ereg_replace('[^0-9.]+','', $value);
}
}Save the file & do your flush=1 etc and that should be it
Jonathan
| 74698 Views | ||
|
Page:
1
|
Go to Top |

