Jump to:

2088 Posts in 1007 Topics by 455 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Setting Currency

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: 1379 Views
  • Eco
    Avatar
    Community Member
    15 Posts

    Setting Currency Link to this post

    I set the currency for the ecommerce module to NZD in the mysite/_config.php file, but it's still showing up as USD:

    http://kitchenselections.com/products/

    Is there somewhere else I need to change the currency?

  • inCharge
    Avatar
    Community Member
    102 Posts

    Re: Setting Currency Link to this post

    You should have:

    Payment::set_site_currency('NZD');

    Change that, and the currency shown after the price changes. It should work, so check yopu're changing the right file, and it's uploaded to the right place etc. e.g. change the currency symbol to ! and see if that change shows up.

    To set the symbol before the price, you should also have:

    Currency::setCurrencySymbol('$');

    While we're on the subject, Europeans note that to get a non-ascii currency symbol such as the UK pound sign, try saving the _config.php file in UTF-8 format.

  • inCharge
    Avatar
    Community Member
    102 Posts

    Re: Setting Currency Link to this post

    By the way, what versions of SilverStripe & ecommerce are you using?

  • Eco
    Avatar
    Community Member
    15 Posts

    Re: Setting Currency Link to this post

    Thank you, I figured it out in the end - just a case of formatting.

    I'm using the latest versions of both Silverstripe and ecommerce

  • bones
    Avatar
    Community Member
    104 Posts

    Re: Setting Currency Link to this post

    Thanks for this information.

    However, on the Checkout page, the total is still showing with the "$" symbol, despite every other currency symbol showing correctly. Whereabout can this be changed?

  • Shadow02
    Avatar
    Community Member
    3 Posts

    Re: Setting Currency Link to this post

    Hi,

    I'm having the same problem.

    Added the following to mysite\_config.php and saved the file using UTF-8

    Payment::set_site_currency('GBP');
    Currency::setCurrencySymbol('£');

    But the Total amount still shows as $

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Setting Currency Link to this post

    I haven't ever seen the ecommerce module before, but a suggestion: Did you check the template files or the source code to see if the dollar sign is being hard-coded somewhere?

  • bones
    Avatar
    Community Member
    104 Posts

    Re: Setting Currency Link to this post

    That's my guess too. I've looked, but can't find it.

    1379 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.