From bced7e881f9871f6f063e1e975b27d915ac274f6 Mon Sep 17 00:00:00 2001 From: Danny Verkade - Cream Date: Fri, 13 Dec 2024 11:59:03 +0100 Subject: [PATCH] Improved performance of tracking In the current situation it loads all the currencies which are available in the installation. However it should process only the currency codes which are actually available for the specific store view. --- Block/Tracking.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Block/Tracking.php b/Block/Tracking.php index efdf8e5..db56a2b 100644 --- a/Block/Tracking.php +++ b/Block/Tracking.php @@ -236,7 +236,7 @@ public function getCurrentCurrencySymbol() */ public function getAllCurrencySymbols() { - $currency_codes = $this->getAllowedCurrencies(); + $currency_codes = $this->getAvailableCurrencyCodes(); $currency_symbols_array = array(); foreach ($currency_codes as $code) { $currency_symbols_array[$code] = $this->_localeCurrency->getCurrency($code)->getSymbol(); @@ -251,7 +251,7 @@ public function getAllCurrencySymbols() */ public function getAllCurrencyRates() { - $currency_codes = $this->getAllowedCurrencies(); + $currency_codes = $this->getAvailableCurrencyCodes(); $currency_rates_array = array(); foreach ($currency_codes as $code) { $currency_rates_array[$code] = $this->getCurrencyRateFromIso($code); @@ -264,9 +264,9 @@ public function getAllCurrencyRates() * * @return array */ - public function getAllowedCurrencies() + public function getAvailableCurrencyCodes() { - return $this->_storeManager->getStore()->getAllowedCurrencies(); + return $this->_storeManager->getStore()->getAvailableCurrencyCodes(); } /**