вам нужно изменить контроллер / common / header.php
if (($this->request->server['REQUEST_METHOD'] == 'POST') && isset($this->request->post['language_code'])) {
$this->session->data['language'] = $this->request->post['language_code'];
if (isset($this->request->post['redirect'])) {
$this->redirect($this->request->post['redirect']);
} else {
$this->redirect($this->url->link('common/home'));
}
}
для чего-то вроде этого:
if (($this->request->server['REQUEST_METHOD'] == 'POST') && isset($this->request->post['language_code'])) {
$this->session->data['language'] = $this->request->post['language_code'];
$this->currency->set($this->request->post['currency_code']);
unset($this->session->data['shipping_methods']);
unset($this->session->data['shipping_method']);
if (isset($this->request->post['redirect'])) {
$this->redirect($this->request->post['redirect']);
} else {
$this->redirect($this->url->link('common/home'));
}
}
Я знаю, что ответ находится внутри StackOverflow, но я ненашел его снова.
и теперь .. вам нужно изменить шаблон header.tpl:
<form name="language" action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
<div id="language">
<img src="image/flags/se.png" alt="Svenska" title="Svenska" onclick="$('input[name=\'language_code\']').attr('value', 'se'); $('input[name=\'currency_code\']').attr('value', 'SEK'); $(this).parent().parent().submit();" />
<img src="image/flags/dk.png" alt="Danish" title="Danish" onclick="$('input[name=\'language_code\']').attr('value', 'da').submit(); $(this).parent().parent().submit();" />
<img src="image/flags/gb.png" alt="English" title="English" onclick="$('input[name=\'language_code\']').attr('value', 'en').submit(); $('input[name=\'currency_code\']').attr('value', 'GBP').submit(); $(this).parent().parent().submit();" />
<input type="hidden" name="language_code" value="" />
<input type="hidden" name="currency_code" value="" />
<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</div>
</form>
С наилучшими пожеланиями,