Will, I had to do almost exactly the same thing not so long ago, and also the client wanted to be able to decide whether to move a price in another currency when the exchange rate changed.. In other words he didnt want to automatically display the price in the other currency, he wanted to be able to decide whether to respond to currency movements or not.
So I gave him a table of 'internal exchange rates' where the prices would converted. Every few days eh'd look in his admin back end at the exchange update table (which would go and get the current rates from his bank's web service and ask him if he wanted to update the conversion rate in his site. He'd accept (or not) the recommendation on that page. The onSessionStart() method placed two variables in the session scope - session.currencysumbol and session.currency defaulting to "$" and "USD". THe user's login details would give the user's preferences for currency out of their profile in the database when they logged in, or there is a drop down in the footer of each page allowing them to change the currency for this session. Then on the public side of the site, every price displayed everywhere was not just #dollarformat(price)# but instead the code was as follows: #session.currencysymbol##application.conversionfactor[session.currency] * price# Since the default currency is USD anyone who wants display in USD would get the price multiplied by the conversion factor 1.0. The other currencies would be converted by whatever was the rate stored in the application scope. Sounds more complex than it really is. The actual transaction is stored in USD, his default currency and the currency he reports his accounts in, but the shopping cart would display all money values in whatever currency the user wanted to see. Another thing to consider is you have to store the rate used with the transaction, so you can produce exactly the same figures at some later date, when the exchange rates might have changed considerably. You'll have customers in Germany saying "you quoted me DM305 but you billed me DM307, now my copy invoice (produced later) shows DM315. what gives?" In other words, while you store your accounting figures in USD, you have to convert to other currencies at whatever rate the customer had at the time of the transaction, not what it is now. HTH Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month > > Will Tomlinson wrote: > > I've done a bit of searching through the archives but can't come up with a > > concrete answer for my situation here. > > > > I've setup an events application in which each event has a ticket price. I > > display this field's value with dollarformat(). No problem there. > > > > But now, my client wants to allow a few specific international currencies > > for display. > > > > He says: > > > > "I've been thinking about this one... we do need to address the issue of > > multiple currencies. Probably an additional field, default to US$ but > > include Euros, C$, A$, probably some more." > > > > Is there an easy way to do this? Would LSCurrencyFormat() just > > automatically take care of everything for me? > > > > Thanks, > > Will > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301786 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

