Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multiple Currencies?


grahamn

Recommended Posts

Hi

 

I wonder if this is a simple thing, or is it likely to be too complicated to be viable?

 

I would like to show multiple currencies on product prices, while keeping to a single currency at check out etc.

 

For example:

 

My store has pricing in ? (GBP). I would like to show prices in the format of - ?10.00 ($18.50, EUR 17.50)

 

The dollar and Euro prices being calculated on the fly according to the exchange rate set up.

 

This way, the shopping cart, checkout etc. would remain as GBP, while customers could see the approximate costs in their own currency.

 

Any advise?

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

Hey,

I found a thread about this issue in the German forum.

 

As some European countries switched from their national currency to Euro, this function is (already and still) integrated in osCom.

 

- Open currencies.php at "classes"

- Find the following lines:

 

// if the selected currency is in the european euro-conversion and the default currency is euro,

// the currency will displayed in the national currency and euro currency

if ( (DEFAULT_CURRENCY == 'EUR') && ($currency_type == 'DEM' || $currency_type == 'BEF' || $currency_type == 'LUF' || $currency_type == 'ESP' || $currency_type == 'FRF' || $currency_type == 'IEP' || $currency_type == 'ITL' || $currency_type == 'NLG' || $currency_type == 'ATS' || $currency_type == 'PTE' || $currency_type == 'FIM' || $currency_type == 'GRD') ) {

$format_string .= ' <small>[' . $this->format($number, true, 'EUR') . ']</small>';

}

 

 

 

 

Now you can alter the above:

- Change DEFAULT_CURRENCY to GBP and add a $currency_type == 'EUR'

Should look like:

 

... if ( (DEFAULT_CURRENCY == 'GBP') && ($currency_type == 'EUR' || $currency_type == 'DEM' || ....

 

You can alter the layout at:

$format_string .= ' <small>[' . $this->format($number, true, 'EUR') . ']</small>';

 

 

 

 

Done. Now you have always two prices displayed.

 

Thanks to Henri Schmidhuber, who wrote the original explanation in the German forum.

java script:emoticon(':thumbsup:',%20'smid_16')

 

I hope it helps you too.

Cheers Stefan

Link to comment
Share on other sites

Hey,

I found a thread about this issue in the German forum.

 

As some European countries switched from their national currency to Euro, this function is (already and still) integrated in osCom.

 

- Open currencies.php at "classes"

- Find the following lines:

 

// if the selected currency is in the european euro-conversion and the default currency is euro,

// the currency will displayed in the national currency and euro currency

if ( (DEFAULT_CURRENCY == 'EUR') && ($currency_type == 'DEM' || $currency_type == 'BEF' || $currency_type == 'LUF' || $currency_type == 'ESP' || $currency_type == 'FRF' || $currency_type == 'IEP' || $currency_type == 'ITL' || $currency_type == 'NLG' || $currency_type == 'ATS' || $currency_type == 'PTE' || $currency_type == 'FIM' || $currency_type == 'GRD') ) {

$format_string .= ' <small>[' . $this->format($number, true, 'EUR') . ']</small>';

}

 

Now you can alter the above:

- Change DEFAULT_CURRENCY to GBP and add a $currency_type == 'EUR'

Should look like:

 

... if ( (DEFAULT_CURRENCY == 'GBP') && ($currency_type == 'EUR' || $currency_type == 'DEM' || ....

 

You can alter the layout at:

$format_string .= ' <small>[' . $this->format($number, true, 'EUR') . ']</small>';

Done. Now you have always two prices displayed.

 

Thanks to Henri Schmidhuber, who wrote the original explanation in the German forum.

java script:emoticon(':thumbsup:',%20'smid_16')

 

I hope it helps you too.

Cheers Stefan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...