Подскажите как такое же сделать для ocStore 2.3.0.2.2 ?
Там я так понимаю путь к этой логике лежит в /catalog/controller/startup/startup.php
$code = '';
$this->load->model('localisation/currency');
$currencies = $this->model_localisation_currency->getCurrencies();
if (isset($this->session->data['currency'])) {
$code = $this->session->data['currency'];
}
if (isset($this->request->cookie['currency']) && !array_key_exists($code, $currencies)) {
$code = $this->request->cookie['currency'];
}
if (!array_key_exists($code, $currencies)) {
$code = $this->config->get('config_currency');
}
if (!isset($this->session->data['currency']) || $this->session->data['currency'] != $code) {
$this->session->data['currency'] = $code;
}
if (!isset($this->request->cookie['currency']) || $this->request->cookie['currency'] != $code) {
setcookie('currency', $code, time() + 60 * 60 * 24 * 30, '/', $this->request->server['HTTP_HOST']);
}
$this->registry->set('currency', new Cart\Currency($this->registry));