Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Setting Currency - no ecommerc module


Go to End


3 Posts   1700 Views

Avatar
merrick_sd

Community Member, 99 Posts

26 April 2010 at 10:21pm

Edited: 26/04/2010 10:22pm

How can i set the currency to pounds instead of USdollars for the website?

I am not using the ecommerce module for mysite, but have a currency field.

HousePage.php extract****
***************************
class HousePage extends Page {
static $db = array(
"numeric_price" => 'Currency'
);
}

my template page has $numeric_price.Whole

my php page is called HousePage.php

version: SilverStripe-v2.3.6

Avatar
merrick_sd

Community Member, 99 Posts

26 April 2010 at 10:28pm

I think i've fixed it

Saphire >core>model>fieldtypes Currency.php

line 9: protected static $currencySymbol = '$';

changed to

line 9: protected static $currencySymbol = '£';

Avatar
biapar

Forum Moderator, 435 Posts

2 May 2010 at 8:13pm

... and in config.php under mysite, you add:

Order::set_site_currency("Eur");