diff --git a/classes/Currency.php b/classes/Currency.php index befc25fd1..ed77d731e 100644 --- a/classes/Currency.php +++ b/classes/Currency.php @@ -105,7 +105,6 @@ class CurrencyCore extends ObjectModel // price sign before or after the price number $this->prefix = $this->format % 2 != 0 ? $this->sign.' ' : ''; $this->suffix = $this->format % 2 == 0 ? ' '.$this->sign : ''; - } /** * Overriding check if currency with the same iso code already exists. @@ -181,12 +180,15 @@ class CurrencyCore extends ObjectModel 'left' => $this->sign.' ', 'right' => ' '.$this->sign ); + $formats = array( 1 => array('left' => &$formated_strings['left'], 'right' => ''), 2 => array('left' => '', 'right' => &$formated_strings['right']), 3 => array('left' => &$formated_strings['left'], 'right' => ''), 4 => array('left' => '', 'right' => &$formated_strings['right']), + 5 => array('left' => '', 'right' => &$formated_strings['right']) ); + return ($formats[$this->format][$side]); } diff --git a/js/tools.js b/js/tools.js index ee799ad66..435511e19 100644 --- a/js/tools.js +++ b/js/tools.js @@ -73,6 +73,8 @@ function formatCurrency(price, currencyFormat, currencySign, currencyBlank) return (currencySign + blank + formatNumber(price, priceDisplayPrecision, '.', ',')); if (currencyFormat == 4) return (formatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign); + if (currencyFormat == 5) + return (formatNumber(price, priceDisplayPrecision, ' ', '.') + blank + currencySign); return price; } diff --git a/themes/default/js/tools.js b/themes/default/js/tools.js index 0a8e738a6..fadd18a81 100644 --- a/themes/default/js/tools.js +++ b/themes/default/js/tools.js @@ -95,6 +95,8 @@ function formatCurrency(price, currencyFormat, currencySign, currencyBlank) return (currencySign + blank + formatNumber(price, priceDisplayPrecision, '.', ',')); if (currencyFormat == 4) return (formatNumber(price, priceDisplayPrecision, ',', '.') + blank + currencySign); + if (currencyFormat == 5) + return (formatNumber(price, priceDisplayPrecision, ' ', '.') + blank + currencySign); return price; }