Going Multi-Currency

59 views
Skip to first unread message

Jedateach

unread,
Mar 8, 2012, 4:47:12 PM3/8/12
to silverstrip...@googlegroups.com
For the shop module to grow and be come more scalable, it needs to become multi-currency. Users/developers have identified this as a basic need for the module, and I would agree. Here I document my ideas for implementation.

Choosing Currency

To choose a currency for browsing in, you will simply choose the currency from a dropdown / currency icons etc. The chosen currency will at least be stored in the session. It could also be stored in the member's profile, if they are logged in. Finally, it could be stored in the order/cart, so that if an order is continued on another computer etc, they will still see it in the selected currency.

My default assumption will be that if an order is placed, or cancelled, then the currency will remain in whatever was selected/automatically switched to. If an order is continued, or a member is logged in, with a previously selected currency, then the site will switch to that currency.

Displaying Prices
Prices for products etc will all be stored in a base currency. A currencies table will also be stored, containing conversion rates. This table can be cron-updated every hour via a webservice, or whatever is desired.
When a price is rendered, and a non-base currency is selected, it will be run through the conversion table before it is  displayed.

Placing Orders
When an order is placed, the total is calculated for the last time, and stored permanently in the Order, in the base currency. It could also some or all of: selected currency, current conversion rate, converted total.
These stored values can then be used to display historical orders in either the base currency, or selected currency, using the conversion rate for that point of time.

Payments
Payments can be stored in whatever currency the order was placed in. To check if an order has been paid, the system will total the payments made, and compare to the converted total.

Still to figure out
  • What if someone takes a long time to pay, and the payment gateway conversion rate significantly differs from the stored conversion rate? ...perhaps recalculate order total on payment?
  • What if a payment gateway doesn't support paying in the selected currency? ...perhaps revert to base currency?
    • The system could perhaps also offer different payment options, based on selected currency.
  • Handling multiple payments in different currencies...or not? ...in the edge case that your site allows partial payments.
  • Provision for changing the base currency?

I'm really keen to hear thoughts and ideas on this work. It is a rather significant feature for ecommerce/shop, and it needs to be done well.

Marijn Kampf

unread,
Mar 9, 2012, 4:24:07 AM3/9/12
to silverstrip...@googlegroups.com
Hi Jedateach,

I'd also like to see the option to set specific amounts for a product in each currency manually. E.g. a USD 5.00 product I would price as GBP 3.50 and EUR 4.00 automatic conversion would end up with unfamiliar looking amounts of GBP 3.17 / EUR 3.78.

Marijn.
Reply all
Reply to author
Forward
0 new messages