Guest Posted April 29, 2008 Share Posted April 29, 2008 Hi, This may have been asked before so forgive a noobie lol At present the prices in my store show as £10.00 I would like to be able to show the price in dollars for example £10.00 (US$ 19.74) Can anyone point me in the right direction of what I need to change. Thanks Aran Link to comment Share on other sites More sharing options...
dmnalven Posted April 29, 2008 Share Posted April 29, 2008 Every function/class/script that generates prices. For ALL problems, please review this link first -> osCommerce Knowledge Base Link to comment Share on other sites More sharing options...
Guest Posted April 29, 2008 Share Posted April 29, 2008 Every function/class/script that generates prices. not a very helpful answer but thanks anyway Aran Link to comment Share on other sites More sharing options...
jefs.42 Posted April 30, 2008 Share Posted April 30, 2008 heh. yeah, as long as the place it prints it out uses the $currency->format(...) to print it, you can edit the includes/classes/currencies.php. This section of the function format(...) in that file should be close to what you're looking for, just replace the EUR's with USD's: if ($calculate_currency_value == true) { $rate = (tep_not_null($currency_value)) ? $currency_value : $this->currencies[$currency_type]['value']; $format_string = $this->currencies[$currency_type]['symbol_left'] . number_format(tep_round($number * $rate, $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']; $rate = $this->currencies['EUR']['value']; $format_string .= " (" . $this->currencies['EUR']['symbol_left'] . number_format(tep_round($number * $rate, $this->currencies['EUR']['decimal_places']), $this->currencies['EUR']['decimal_places'], $this->currencies['EUR']['decimal_point'], $this->currencies['EUR']['thousands_point']) . $this->currencies['EUR']['symbol_right'] . ")"; } 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']; $format_string = " (" . $this->currencies['EUR']['symbol_left'] . number_format(tep_round($number, $this->currencies['EUR']['decimal_places']), $this->currencies['EUR']['decimal_places'], $this->currencies['EUR']['decimal_point'], $this->currencies['EUR']['thousands_point']) . $this->currencies['EUR']['symbol_right'] . ")"; } Link to comment Share on other sites More sharing options...
Guest Posted April 30, 2008 Share Posted April 30, 2008 heh. yeah, as long as the place it prints it out uses the $currency->format(...) to print it, you can edit the includes/classes/currencies.php. This section of the function format(...) in that file should be close to what you're looking for, just replace the EUR's with USD's: if ($calculate_currency_value == true) { $rate = (tep_not_null($currency_value)) ? $currency_value : $this->currencies[$currency_type]['value']; $format_string = $this->currencies[$currency_type]['symbol_left'] . number_format(tep_round($number * $rate, $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']; $rate = $this->currencies['EUR']['value']; $format_string .= " (" . $this->currencies['EUR']['symbol_left'] . number_format(tep_round($number * $rate, $this->currencies['EUR']['decimal_places']), $this->currencies['EUR']['decimal_places'], $this->currencies['EUR']['decimal_point'], $this->currencies['EUR']['thousands_point']) . $this->currencies['EUR']['symbol_right'] . ")"; } 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']; $format_string = " (" . $this->currencies['EUR']['symbol_left'] . number_format(tep_round($number, $this->currencies['EUR']['decimal_places']), $this->currencies['EUR']['decimal_places'], $this->currencies['EUR']['decimal_point'], $this->currencies['EUR']['thousands_point']) . $this->currencies['EUR']['symbol_right'] . ")"; } cheers matey that worked a treat :thumbsup: Aran Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.