SEDef Posted February 28, 2006 Posted February 28, 2006 Hi there I need help on how to display two currencies for the products, in shopping cart, sub-total and total. Example: Logitech Mouse PS/2 29.99 USD (25.00 EUR) It will be enough to display two currencies only at the product. Is out there any module or can anyone help me with this. It is urgent!!! Thanks!
mark27uk3 Posted February 28, 2006 Posted February 28, 2006 Try this Display two currencies Mark Lifes a bitch, then you marry one, then you die!
SEDef Posted February 28, 2006 Author Posted February 28, 2006 Try this Display two currencies Mark O yes! It works! Thank you very many! :) Sedef
majerfra Posted March 1, 2006 Posted March 1, 2006 Try this Display two currencies Mark as i mentioned in the other post : it not idisplay both currencies in checkout_confirmation.php and so later in the invoice! any help please?
boxtel Posted March 1, 2006 Posted March 1, 2006 as i mentioned in the other post : it not idisplay both currencies in checkout_confirmation.php and so later in the invoice! any help please? well, undo the change you did to the currencies class display_price function, then: before this code in the function format return $format_string; you add: $currency_type = 'EUR'; // second currency if ($calculate_currency_value == true) { $rate = (tep_not_null($currency_value)) ? $currency_value : $this->currencies[$currency_type]['value']; $format_string .= '<br>'.$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']; 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 .= '<br>'.$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']; } WARNING: this will do it to ALL your prices. Treasurer MFC
majerfra Posted March 1, 2006 Posted March 1, 2006 well, undo the change you did to the currencies class display_price function, then: before this code in the function format return $format_string; you add: $currency_type = 'EUR'; // second currency if ($calculate_currency_value == true) { $rate = (tep_not_null($currency_value)) ? $currency_value : $this->currencies[$currency_type]['value']; $format_string .= '<br>'.$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']; 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 .= '<br>'.$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']; } WARNING: this will do it to ALL your prices. yes .. it works fine .. till checkout_confirmation.php ... now I have same amount in both currencies in checkout_confirmation.php ... any further help, please ? thanx in advance
boxtel Posted March 1, 2006 Posted March 1, 2006 yes .. it works fine .. till checkout_confirmation.php ... now I have same amount in both currencies in checkout_confirmation.php ... any further help, please ? thanx in advance what if you add this: $currency_value = ''; right after this: $currency_type = 'EUR'; // second currency Treasurer MFC
majerfra Posted March 1, 2006 Posted March 1, 2006 what if you add this: $currency_value = ''; right after this: $currency_type = 'EUR'; // second currency wauuuu .. now it worksssssssss well .. big thanks
majerfra Posted March 1, 2006 Posted March 1, 2006 what if you add this: $currency_value = ''; right after this: $currency_type = 'EUR'; // second currency another question .. if I dare ... where to put bracket or space between two currencies ...
boxtel Posted March 1, 2006 Posted March 1, 2006 another question .. if I dare ... where to put bracket or space between two currencies ... where it says: $format_string .= '<br>'.$this->currencies[$curren...... you replace the <br> with / or - or.... Treasurer MFC
majerfra Posted March 1, 2006 Posted March 1, 2006 where it says: $format_string .= '<br>'.$this->currencies[$curren...... you replace the <br> with / or - or.... yes, i know .. i have try this. it works but not in checkout_confirmation.php and so later in the invoice ... any idea?
aguilherme Posted June 27, 2007 Posted June 27, 2007 How I can select the language so that the page shows the value in the correct currency? If I select the languages standards (English, German or Spanish) the page automatically is shown with its respective currencies. But if I select Portuguese Brazilian it does not show the correct currency (BRL R$). Please it helps me! How I must proceeds? If possible it makes a visit and it has tested the store virtual. Thanks! Aziz Guilherme
Recommended Posts
Archived
This topic is now archived and is closed to further replies.