Our pricing page shows three currencies, and the only place a price is written down is one table. Here is how that holds together.
You can see it live: pounds , euros and dollars are the same page with a different query string.
One table, nothing else holds a price
CogniPrep Assess sells yearly plans by candidate allowance. The pricing page, the allowance screens, the emails and the plan change in Settings all read from a single price book in lib/pricing.ts . Amounts are stored in minor units (pence, cents), with a digit separator before the last two digits so a person can read them:
{ key : 'starter' , allowance : 250 , yearlyFee : { GBP : 1_900_00 , EUR : 2_300_00 , USD : 2_600_00 } , extraCandidate : { GBP : 10_00 , EUR : 12_00 , USD : 13_50 } , }
Enter fullscreen mode
Exit fullscreen mode
1_900_00 is 1,900.00.…