The problem is that you have a product that is sold in different modes of exchange with different cultures. Let's say it's $ 1,450.00 USD in America and & 1,111.11 euros in Germany. There are two main factors:
a. There are different prices in different currencies.
B. There are various ways to display the amount of money in different cultures.
As for A, you can
- store in one price / currency and adjust various exchange rates "on the fly"
- or set up night
- or just different prices in different countries.
I would go with a price table divided by currency. updating at night is probably reasonable:
ProductId Currency Price 1 EUR 1111.11 1 CAD 1436.65 1 USD 1450.00
These values must be numbers, so you can easily do the math if necessary. Use decimal (10,2) in your database
Relative to B
You must format the selected price for this crop when displaying. Imagine that Americans pay in euros. What do they want to see? Your result will look like this, depending on the chosen culture:
Let's say 1,111.11 euros
Culture Price Long Name de_de 1.111,11 (German) fr_ca 1 111,11 (Quebec) en_us 1,111.11 (US English)
It’s all the same, it’s just formatted differently, depending on the user's preferences.
If users enter different amounts, you will also have to analyze their values based on the selected culture. Check out the Yii (sorry PHP) L10N and I18N functions .
Notes:
No matter what you do, do not store it as a float, or you will get subtle errors over time. Use decimal type
Consider using 4 digits after the decimal point for fields that are the result of calculations.