Second language ->not at setting table
Posted: Wed Mar 25, 2009 1:51 am
Hi:
Working with 1.2.3
At the OpenCart, the languages are stored at the table "language".
When you create a language there is added a record a this table with information about that language. For example, for Spanish OpenCart insert a record with the field language_id = 2
But in the table setting there are records with information about the languages, for example config_welcome_1 say the welcome to english language (you see the number 1 at end) but ...
and here is the bug...
When created a new language there is not added a record at setting with config_welcome_2 (for this sample),etc...
Then if you changed the default web language at the admin/controller/setting/setting.php, the instruction:
if (($this->request->server['REQUEST_METHOD'] == 'POST') && ($this->validate())) {
have a validate()
and become errors controlated by code because there is not a record with config_welcome_2 and you cannot change the default language:
if (!$this->request->post['config_welcome_' . $language['language_id']]) {
$this->error['welcome_' . $language['language_id']] = $this->language->get('error_welcome');
)
Best,
Hilde
Working with 1.2.3
At the OpenCart, the languages are stored at the table "language".
When you create a language there is added a record a this table with information about that language. For example, for Spanish OpenCart insert a record with the field language_id = 2
But in the table setting there are records with information about the languages, for example config_welcome_1 say the welcome to english language (you see the number 1 at end) but ...
and here is the bug...
When created a new language there is not added a record at setting with config_welcome_2 (for this sample),etc...
Then if you changed the default web language at the admin/controller/setting/setting.php, the instruction:
if (($this->request->server['REQUEST_METHOD'] == 'POST') && ($this->validate())) {
have a validate()
and become errors controlated by code because there is not a record with config_welcome_2 and you cannot change the default language:
if (!$this->request->post['config_welcome_' . $language['language_id']]) {
$this->error['welcome_' . $language['language_id']] = $this->language->get('error_welcome');
)
Best,
Hilde