PDA

View Full Version : Dynamic currency conversion


Nick
29-May-2003, 09:00 PM
Hi all

Bit of a long shot.... but has anyone discovered a way of feeding dynamically updated currency conversions to the alternate price on a product page.

i.e. As well as displaying the price in sterling next to a product, is there a way of showing the true equivalent amount in, say, Euros and for this to update dynamically everytime the visitor refreshes the page?

Cheers

Nick

webyourbusiness
30-May-2003, 01:23 AM
You could do it in cgi or php - as long as you can parse for server side includes. Write a script (php or perl) to grab rates and pass the base currency to it in the template using an SSI call.

I did this back with v3 - the problem arose with large numbers of products on a page - it got slow.

regards

Greg Hewitt-Long

Jan
30-May-2003, 07:13 AM
Ii think that this (http://community.actinic.com/showthread.php?s=&threadid=310) thread contains the answer.

Regards

webyourbusiness
30-May-2003, 01:12 PM
Jan,

I think you mean that *THAT* thread contains one of many possible solutions.

That solution would definitely work - but it does rely on xe.net being up and functioning (which is wasn't on Tuesday for at least several hours). It would be more self-reliant to write two scripts:

1. to grab rates to a flat-file or database on your machine, overwritting the last set of rates - either run periodically by cron (or similar scheduler), or some other method of run.

2. to use this local "rates database" either dynamically when the page is retrieve, or when the rates are requested by the end-user (the popup method would be preferable for system load on busy Actinic stores).

regards

Greg