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


Go to End


8 Posts   3165 Views

Avatar
Eco

Community Member, 15 Posts

28 April 2011 at 2:39pm

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?

Avatar
inCharge

Community Member, 102 Posts

28 April 2011 at 11:09pm

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.

Avatar
inCharge

Community Member, 102 Posts

28 April 2011 at 11:10pm

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

Avatar
Eco

Community Member, 15 Posts

2 May 2011 at 10:20am

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

Avatar
bones

Community Member, 110 Posts

3 August 2011 at 12:21am

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?

Avatar
Shadow02

Community Member, 3 Posts

28 August 2011 at 9:10pm

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 $

Avatar
Ryan M.

Community Member, 309 Posts

30 August 2011 at 7:13pm

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?

Avatar
bones

Community Member, 110 Posts

30 August 2011 at 8:51pm

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