Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Display two currencies ... EU is coming


gregy

Recommended Posts

Hi!

 

I found numerous of posts (questions) here, asking how to display two currencies for one product. I read over 10 posts without one single answer.

 

Can't this be done!? .. i mean a lot of people using OSC is joining EU community, and therefore they have to display two currencies . their own and EUR ... me also :-"

 

..anybody

Link to comment
Share on other sites

Hi!

 

I found numerous of posts (questions) here, asking how to display two currencies for one product. I read over 10 posts without one single answer.

 

Can't this be done!? .. i mean a lot of people using OSC is joining EU community, and therefore they have to display two currencies . their own and EUR ... me also :-"

 

..anybody

 

I believe you can simply ask the currency class like :

 

echo $currencies->format($price, true, 'USD');

echo $currencies->format($price, true, 'EUR');

 

the "true" part forces value recalculation based on the given currency exchange rate.

Treasurer MFC

Link to comment
Share on other sites

thanx

 

can u please explain me what means this code in curencies class

 

// 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>';
	}
  } else {
	$format_string = $this->currencies[$currency_type]['symbol_left'] . ' ' . number_format(tep_round($number, $this->currencies[$currency_type]['decimal_places']), $this->currencies[$currency_type]['decimal_places'], $this->currencies[$currency_type]['decimal_point'], $this->currencies[$currency_type]['thousands_point']) . $this->currencies[$currency_type]['symbol_right'];
  }

 

there are two currencies mentioned .. i'm no php freak :(

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...