From 41794dca515c2b5aec5ff27906dba4402eca385f Mon Sep 17 00:00:00 2001 From: max-baranikov Date: Wed, 22 Dec 2021 11:45:31 +0300 Subject: [PATCH] Catalog generation: Setting default currency if it was not set in the Context --- retailcrm/lib/RetailcrmCatalog.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/retailcrm/lib/RetailcrmCatalog.php b/retailcrm/lib/RetailcrmCatalog.php index cd45924..d79b538 100644 --- a/retailcrm/lib/RetailcrmCatalog.php +++ b/retailcrm/lib/RetailcrmCatalog.php @@ -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()