Page 1 of 1

new fresh install 2101

Posted: Sat Dec 26, 2015 6:47 pm
by mervyn
Hi hope you help me I have installed the new version of Opencart 2.1.0.1 also installed a new theme buty I do have this error Notice: Undefined variable: icon in /home/badgeran/public_html/catalog/view/theme/octheme_1027/template/common/header.tpl on line 20 Notice: Undefined variable: google_analytics in /home/badgeran/public_html/catalog/view/theme/octheme_1027/template/common/header.tpl on line 39

I thought I would sort this out by installing the Google stuff, I have verified owner of http://www.badgerandbowl.com
but still I have this error I'm not a web designer or a coder guys so please be kind, hope you guys can just point me in the direction to sort this issue out.

Regards Mervyn

Re: new fresh install 2101

Posted: Sat Dec 26, 2015 7:04 pm
by jimmyphong
Two error !

Go to admin ->Setting -> Image -> Icon upload a favicon icon to you store
Open file public_html/catalog/view/theme/octheme_1027/template/common/header.tpl
replace $google_analytics with $config_google_analytics

Or can you pm me to help you fix it !

Re: new fresh install 2101

Posted: Sun Dec 27, 2015 4:19 pm
by mervyn
Thanks Jimmy will give that a shot, thanks

Mervyn

Re: new fresh install 2101

Posted: Sun Dec 27, 2015 10:33 pm
by jimmyphong
Because in opencart 2.1.x has some change in core, and you custom theme not compatible
Here is fix issue
open file catalog/view/theme/ you theme /template/common/header.tpl

find

Code: Select all

<?php echo $google_analytics; ?>
replace with

Code: Select all

<?php foreach ($analytics as $analytic) { ?>
<?php echo $analytic; ?>
<?php } ?>
find

Code: Select all

<?php if ($icon) { ?>
replace with

Code: Select all

<?php if (isset($icon)) { ?>

Re: new fresh install 2101

Posted: Mon Dec 28, 2015 4:25 pm
by mervyn
Thanks Jimmy very much all done now.

Best regards Mervyn

Re: new fresh install 2101

Posted: Mon Feb 08, 2016 10:36 pm
by diljeet
hi i am getting this error after updating the code in header file
"Parse error: syntax error, unexpected end of file in /home/premiumdjk/public_html/catalog/view/theme/ancart/template/common/header.tpl on line 123"
any solutions?

Re: new fresh install 2101

Posted: Mon Feb 08, 2016 11:32 pm
by OSWorX
diljeet wrote:hi i am getting this error after updating the code in header file
"Parse error: syntax error, unexpected end of file in /home/premiumdjk/public_html/catalog/view/theme/ancart/template/common/header.tpl on line 123"
any solutions?
Edit the file correct.

Re: new fresh install 2101

Posted: Wed Mar 02, 2016 10:31 pm
by parkookk
Hi, I have OC 2.1.0.2 and still get the same error below over and over in my error log:

2016-03-02 14:20:40 - PHP Notice: Undefined variable: icon in /home/myserver/public_html/mediasos.co.uk/system/storage/modification/catalog/view/theme/mediasos/template/common/header.tpl on line 20
2016-03-02 14:20:40 - PHP Notice: Undefined variable: google_analytics in /home/myserver/public_html/mediasos.co.uk/system/storage/modification/catalog/view/theme/mediasos/template/common/header.tpl on line 39

I checked my theme's header.tpl that was just copied from original and there is no word for "icon" in the codes and also the code for google is already:
<?php foreach ($analytics as $analytic) { ?>
<?php echo $analytic; ?>
<?php } ?>

Any idea how to fix it?