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.

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, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Setting Currency - no ecommerc module


Reply


3 Posts   1291 Views

Avatar
merrick_sd

Community Member, 97 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, 97 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");