Post by Josign » Fri Apr 20, 2012 10:18 pm

I uploaded Swedish language into my store at www.josignart.se and I get this message in the top when you choose Swedish as language in the store:
Notice: Undefined index: 2 in /hsphere/local/home/josignart/josignart.se/catalog/controller/module/welcome.php on line 8

I use Opencart 1.5.2.1 and ThemeGlobal
I just cannot find what is wrong in the code:

<?php
class ControllerModuleWelcome extends Controller {
protected function index($setting) {
$this->language->load('module/welcome');

$this->data['heading_title'] = sprintf($this->language->get('heading_title'), $this->config->get('config_name'));

$this->data['message'] = html_entity_decode($setting['description'][$this->config->get('config_language_id')], ENT_QUOTES, 'UTF-8');

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/module/welcome.tpl')) {
$this->template = $this->config->get('config_template') . '/template/module/welcome.tpl';
} else {
$this->template = 'default/template/module/welcome.tpl';
}

$this->render();
}
}
?>

Thank you for any help I can get :)

Newbie

Posts

Joined
Mon Apr 09, 2012 7:01 pm

Post by florinsith » Sat Apr 21, 2012 6:55 pm

You installed the language pack, after you installed and added the welcome module. Which means you now have to edit the welcome module in admin and insert content for the new language too.

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by garywinner » Tue Oct 29, 2013 11:44 am

I also have the same problem.
Having the error as below in the frontpage.

/catalog/controller/module/welcome.php on line 8

I have tried to find any language php file is missed for defining in the new language.
But after adding all back.
This error still exist.

Hope any one can help .

Cheers!

New member

Posts

Joined
Sun Sep 01, 2013 6:31 pm
Location - Hong Kong

Post by florinsith » Tue Nov 05, 2013 11:37 pm

I was refering to edit the welcome module in admin > extension > modules , and for the added modules, click on the new language tab and in the html are insert the content for the new language, you dont have to edit an files.

Image
My Extensions - SuperTheme - Opencart templates - Opencart modules


User avatar
Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am


Post by Arey » Wed Apr 20, 2016 8:33 pm

I got the same problem after i added ukrainian languages. I think that this problem happens when controller can't take value from array $setting['description'], because you did not enter welcome text with use new language. Solution is very simple. Add welcome text in admin panel -> modules -> welcome -> edit ->(select new language and add some text). I hope it will help you to solve this trouble.

Newbie

Posts

Joined
Wed Apr 20, 2016 8:21 pm
Who is online

Users browsing this forum: No registered users and 43 guests