Catalog generation: Setting default currency if it was not set in the Context

This commit is contained in:
max-baranikov 2021-12-22 11:45:31 +03:00 committed by GitHub
parent d0ce7c8ec4
commit 41794dca51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,6 +56,13 @@ class RetailcrmCatalog
$this->version = substr(_PS_VERSION_, 0, 3);
$this->link = new Link();
$this->home_category = Configuration::get('PS_HOME_CATEGORY');
if (null === Context::getContext()->currency) {
if ($this->default_currency) {
$currency = new Currency($this->default_currency);
Context::getContext()->currency = $currency;
}
}
}
public function getData()