Jump to:

2081 Posts in 1001 Topics by 452 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Setting Currency - no ecommerc module

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

Page: 1
Go to End
Author Topic: 1239 Views
  • merrick_sd
    Avatar
    Community Member
    94 Posts

    Setting Currency - no ecommerc module Link to this post

    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

  • merrick_sd
    Avatar
    Community Member
    94 Posts

    Re: Setting Currency - no ecommerc module Link to this post

    I think i've fixed it

    Saphire >core>model>fieldtypes Currency.php

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

    changed to

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

  • biapar
    Avatar
    Forum Moderator
    435 Posts

    Re: Setting Currency - no ecommerc module Link to this post

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

    Order::set_site_currency("Eur");

    1239 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.