Web Design Forum: Currencies - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Currencies How do you do it? Rate Topic: -----

#1 User is offline   AndyJay 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 11
  • Joined: 08-October 09
  • Reputation: 0

Posted 08 October 2009 - 08:56 AM

Hi to all.... Just joined the forum and hope to visit on a regular basis.
To start myself off, i have a question regarding currencies.
We currently only sell products to our own country (UK) on our e-commerce site.
I'd like to offer our european visitors the ability to purchase and need a way of displaying our prices in their currency.
I've seen a couple of commercial solutions, but was curious to see how everyone else approached it.

How did you do it?

Kind Regards
Andy
0

#2 User is offline   dmpinder 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 431
  • Joined: 17-October 08
  • Reputation: 22
  • Gender:Male
  • Location:Glossop, Derbyshire, United Kingdom
  • Experience:Advanced
  • Area of Expertise:Designer/Coder

Posted 09 October 2009 - 12:00 PM

Hi Andy,

If you're jus interested in how to DISPLAY alternative currencies on your site, that shouldn't be too difficult.

If you're talking about allowing them to buy products in their local currency (e.g. euros), then this advice doesn't cover that. If that is what you want, you need to find out if your ecommerce solution is capable of doing that.

However, to display, the process I'd recommend is:

- Store an alternative currency (e.g. euros) conversion rate as a variable in your programming code
- To display the alternative symbol, simply use a math function in the code to multiply the original UK price by the alternative currency conversion rate.
- Make sure you put the € symbol before the math function, and limit the output to only 2 characters.

I do this on some of my sites, using PHP and a templating language called Smarty. The code would look like this:

€{$price * $eurorate | string_format:"%.2f"}


This only applies to Smarty, but you can see the process being completed.

The only issue you also need to resolve, is that the conversion rate fluctuates all the time. The £ > € conversion rate changes daily, so you need to be able to update this conversion rate on-the-go. You might be able to find some RSS or XML feed that will update it for you, but I can't help you on that.

Hope this helps you Andy. It might be useful also to know which ecommerce software you using, whether it was custom-built or is Magento/CubeCart/X-Cart/etc.

Darren

P.S. If this was useful to you, click the Plus button to the right!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users