From cf05a84f73a36b2fabd08d630e077b6e3ea922f5 Mon Sep 17 00:00:00 2001 From: Hirokazu Nishi Date: Sat, 26 May 2018 23:01:53 +0900 Subject: [PATCH 1/2] fix for Wrong price amount on product page #11717 --- lib/internal/Magento/Framework/Locale/Format.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Locale/Format.php b/lib/internal/Magento/Framework/Locale/Format.php index 7bb4cb4b7d432..8efedf2eaa825 100644 --- a/lib/internal/Magento/Framework/Locale/Format.php +++ b/lib/internal/Magento/Framework/Locale/Format.php @@ -99,7 +99,7 @@ public function getPriceFormat($localeCode = null, $currencyCode = null) $currency = $this->_scopeResolver->getScope()->getCurrentCurrency(); } - $formatter = new \NumberFormatter($localeCode, \NumberFormatter::CURRENCY); + $formatter = new \NumberFormatter($localeCode . '@currency=' . $currency->getCode(), \NumberFormatter::CURRENCY); $format = $formatter->getPattern(); $decimalSymbol = $formatter->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); $groupSymbol = $formatter->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL); From 67a203869a0cff6495bf4953659f0a720cc0641d Mon Sep 17 00:00:00 2001 From: Vishal Gelani Date: Mon, 28 May 2018 12:06:40 +0530 Subject: [PATCH 2/2] Fixed line exceeds issue. --- lib/internal/Magento/Framework/Locale/Format.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/Locale/Format.php b/lib/internal/Magento/Framework/Locale/Format.php index 8efedf2eaa825..00379c87daaf9 100644 --- a/lib/internal/Magento/Framework/Locale/Format.php +++ b/lib/internal/Magento/Framework/Locale/Format.php @@ -99,7 +99,10 @@ public function getPriceFormat($localeCode = null, $currencyCode = null) $currency = $this->_scopeResolver->getScope()->getCurrentCurrency(); } - $formatter = new \NumberFormatter($localeCode . '@currency=' . $currency->getCode(), \NumberFormatter::CURRENCY); + $formatter = new \NumberFormatter( + $localeCode . '@currency=' . $currency->getCode(), + \NumberFormatter::CURRENCY + ); $format = $formatter->getPattern(); $decimalSymbol = $formatter->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); $groupSymbol = $formatter->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL);