Hi,
add this in your mysite/_config.php file:
// Set the currency of the site to be in NZD (New Zealand Dollars).
Payment::set_site_currency('GBP');
Currency::setCurrencySymbol('£ ');
best regards
digital punk
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
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
Hi,
add this in your mysite/_config.php file:
// Set the currency of the site to be in NZD (New Zealand Dollars).
Payment::set_site_currency('GBP');
Currency::setCurrencySymbol('£ ');
best regards
digital punk
That is there, but I'm still getting the error message:
"Fatal error: Call to undefined method Currency::getcurrencysymbol() in /home/wwdncouk/public_html/ecommerce/code/forms/OrderForm.php on line 70"
Also how do you set up the page PayPal redirects to? It is currently going to "Paypal/complete/" Which doesn't exist. Any ideas ?
my bad.
I assumed there would be a get method as well as the set method, I discovered this yesterday.
change the code in orderform.php to:
$total = new Currency('Amount');
$total->setValue($currentOrder->Total());
$paymentFields = Payment::combined_form_fields($total->Nice()." ".$currentOrder->Currency(), $currentOrder->Total());
If you don't want GBP showing try removing:
." ".$currentOrder->Currency()
I've done that and now it displays as:" £ " Which I think is nearly there.
Also - I've added a Shipping Modifier and it works completely up to the point of going to PayPal - anyone know what that is?
Cheers for all the help
yep, it tries to encode the ampersand!
try this in your config instead:
Currency::setCurrencySymbol("£");
works when I tested it, perhaps not ideal but it works.
Don't use PayPal so can't help there sorry.
Cheers,
Rich
Nope that didn't work - just get a lot of ? in diamonds.
Which payment provider do you use? PayPal is driving me nuts.
I use Paymate, not sure it'll do UK banks though.
Are your templates and other pages all saved as UTF-8? when the encoding is off that's when you get the diamonds etc.
Rich