1999 Posts in 530 Topics by 433 members
E-Commerce Modules
SilverStripe Forums » E-Commerce Modules » Currency symbol wrong on bottom of checkout details
Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.
Moderators: martimiz, Nicolaas, Howard, Sean, Ryan M., biapar, Willr, Ingo, Jedateach, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1645 Views |
-
Currency symbol wrong on bottom of checkout details

30 May 2009 at 11:45am
Hi
I've set the ecommerce configurations to use GBP and to have a £ currency symbol. However when you enter your checkout details it displays a £ under the paypal logo.
All other currency symbols display as £
Does anyone know where this rogue $ is generated?
I'm currently running SS 2.3.1 and ecommerce from trunk
Thanks
Aaron
-
Re: Currency symbol wrong on bottom of checkout details

4 June 2009 at 11:37am
Found the problem
In OrderForm.php the $ currency symbol is hard coded on line 71:
$total = '$' . number_format($currentOrder->Total(), 2);
I found this post in the forum
http://www.silverstripe.org/e-commerce-module-forum/show/252874#post252874
Although a simpler fix is to add the following to /sapphire/core/model/fieldtypes/Currency.php
public static function currencySymbol() {
return self::$currencySymbol;
}and then change the line in OrderForm.php to:
$total = Currency::currencySymbol() . number_format($currentOrder->Total(), 2);
NOTE - any upgrade with break to Sapphire will need the change in the Currency.php
| 1645 Views | ||
|
Page:
1
|
Go to Top |

