Closed MatteoPiovanelli-Laser closed 7 years ago
Ideally, existing orders would behave the same they were before the update, so maybe falling back on the current culture's currency is actually the right thing to do when the order's currency is not found. If we don't think this is best, can we fix them in a migration?
On principle we could set a currency in a migration. Any currency, really, I am not sure there is a way to know which is the right one, but setting the site's culture's is probably the safest bet.
Yes.
I added the migration for this in #103
closing because of the merge of #103
As discussed in #99 we should be storing the currency in the Order.
I already tried adding a CurrencyCode property (also a corresponding attribute in the xml that is stored). This works for new orders, where this code can be populated when the order is created.
I don't see a generic way to add a CurrencyCode to pre-existing orders. On display/edit I could show or set the currency given by the current ISelectedCurrencyProvider (see #99), but there is no guarantee that is correct. I cannot trust to read the currency that is currently written in the Order's title, because that is simply given by
Title.ToString("c")
.Can anyone advise on how to overcome that issue?