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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

currency with and without


Go to End


2 Posts   736 Views

Avatar
Arbee

Community Member, 31 Posts

24 February 2017 at 8:26am

Hi,

I have products with prices. The price field type is currency. In the template when I use $Price.Nice it come back with $10.00 - nice :) If I use just $Price I get nothing returned. Paypal has new standards where you can't include the $ in the amount field. How to I display the $Price without the $ in front? ie 10.00. I only need this for the Paypal button, not the entire website where I do want $10.00 displayed.

Avatar
Devlin

Community Member, 344 Posts

25 February 2017 at 5:40am

Edited: 25/02/2017 6:54am

$Price should produce the value without currency symbol. You can try "$Price.Value" too (but this is basically the same as "$Price" except it's missing xss protection)