We’ve migrated our documentation to a new site, which means some URLs have changed.
Subscriptions

How to change the currency symbol or code in Offer Templates

There are two ways of how the currency can be displayed next to any amount in Offer Templates. It's either the currency symbol or the currency code (3-letter abbreviation).

Below is some sample code that models how to change the code EUR to the symbol . So instead of 10 EUR, the price will now show 10 €.

term.firstRealPrice.replace(‘EUR’, ‘’).replace(‘.’, ‘’).replace(‘,’, ‘’).replace(‘€’, ‘’).replace(' ‘, ‘’).slice(0, term.firstRealPrice.replace(‘EUR’,‘’).replace(‘.’,‘’).replace(‘,’, ‘’).replace(‘€’, ‘’).replace(' ‘, ‘’).length - 2 )

Last updated: