View Full Version : Here's an interesting one !

07-05-2002, 04:38 AM


Shopping cart where user can select a currency to view prices in.


How to set it so that the user will see this currency for all pages. And do this with as little code as posible.

Current Solution Used:

Have value hidden "<span>" tag and show it when asked. To keep settings alive, write/read cookie for LCID. So far, only fixed types allowed ie.(CAD vs. USD).


Some solutions like OANDA have code that adjusts the browser settings...that is what I heard, I don't know how to actually do this, other than formatting using SetLocale()...



07-05-2002, 09:28 PM
You are using cookies right? Why don't you cookie the currency and then in a seperate .js file write a script that retrieves the currency and then adds it to whatever the function is called. Then include that script on the top of all your pages and call the function when needed. Maybe you could do a stylesheet or an XML document to hold the currency values. Just Ideas. Seems like fun project. Good luck.