-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currency rates not updated by crontab #18580
Comments
Hi @jcourtei. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @jcourtei do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @denispapec. Thank you for working on this issue.
|
@denispapec Thank you for verifying the issue. Based on the provided information internal tickets |
Hi, |
Hi @jcourtei. Thank you for your report. The fix will be available with the upcoming 2.3.1 release. |
Hi @jcourtei. Thank you for your report. The fix will be available with the upcoming 2.2.9 release. |
Preconditions (*)
Version 2.2.6, probably since version 2.2.4 (Community Edition).
Steps to reproduce (*)
Base store has only one allowed currency (EUR). So EUR is the base currency.
French store uses base store values.
English store has 4 allowed currencies (EUR, CAD, USD, GBP).
Crontab configured to update currency rates everyday.
Expected result (*)
Currency rates should be updated everyday.
Actual result (*)
Crontab only updates currency rate EUR to EUR (which is useless).
I found that this issue comes from Magento\Directory\Model\CurrencyConfig which was created in version 2.2.4, in function getConfigCurrencies :
public function getConfigCurrencies(string $path) { $result = $this->appState->getAreaCode() === Area::AREA_ADMINHTML ? $this->getConfigForAllStores($path) : $this->getConfigForCurrentStore($path); sort($result); return array_unique($result); }
Crontab should update currency rates like in admin panel, so the code should be :
public function getConfigCurrencies(string $path) { $result = $this->appState->getAreaCode() === Area::AREA_ADMINHTML || $this->appState->getAreaCode() === Area::AREA_CRONTAB ? $this->getConfigForAllStores($path) : $this->getConfigForCurrentStore($path); sort($result); return array_unique($result); }
The text was updated successfully, but these errors were encountered: