Compatibility: developed for 6.1.1 (probably applicable with minor variation to $order_row field value for earlier versions)
Note: Currently untested (will confirm shortly).
Open: /lib/orders.php
Find:
Code: Select all
// All prices in the emailed invoices will be shown in the default currency of the store
Code: Select all
// MOD: All prices in the emailed invoices will be shown in the customers preferred currency (Not the default)
Code: Select all
$GLOBALS['TotalCost'] = FormatPrice($order_row['total_inc_tax'], false, true, false, $defaultCurrency, true);
Code: Select all
// MOD Currency values shown (Not default)
//$GLOBALS['TotalCost'] = FormatPrice($order_row['total_inc_tax'], false, true, false, $defaultCurrency, true);
$GLOBALS['TotalCost'] = CurrencyConvertFormatPrice($order_row['total_inc_tax'], $order_row['ordcurrencyid'], $order_row['ordcurrencyexchangerate'], true);
// MOD END
Find:
Code: Select all
$GLOBALS['ProductPrice'] = FormatPrice($product_row[$itemPriceColumn], false, true, false, $defaultCurrency, true);
$GLOBALS['ProductTotal'] = FormatPrice($product_row[$itemTotalColumn], false, true, false, $defaultCurrency, true);
Code: Select all
// MOD Currency values shown (Not default)
//$GLOBALS['ProductPrice'] = FormatPrice($product_row[$itemPriceColumn], false, true, false, $defaultCurrency, true);
$GLOBALS['ProductPrice'] = CurrencyConvertFormatPrice($product_row[$itemPriceColumn], $order_row['ordcurrencyid'], $order_row['ordcurrencyexchangerate'], true);
//$GLOBALS['ProductTotal'] = FormatPrice($product_row[$itemTotalColumn], false, true, false, $defaultCurrency, true);
$GLOBALS['ProductTotal'] = CurrencyConvertFormatPrice($product_row[$itemTotalColumn], $order_row['ordcurrencyid'], $order_row['ordcurrencyexchangerate'], true);
// MOD END
Find:
Code: Select all
$emailTemplate->assign('value', formatPrice($row['value'], false, true, false, $defaultCurrency, true));
Code: Select all
// MOD Currency values shown (Not default)
//$emailTemplate->assign('value', formatPrice($row['value'], false, true, false, $defaultCurrency, true));
$emailTemplate->assign('value', CurrencyConvertFormatPrice($row['value'], $order_row['ordcurrencyid'], $order_row['ordcurrencyexchangerate'], true));
// MOD END