Post by mervyn » Sat Dec 26, 2015 6:47 pm

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

New member

Posts

Joined
Tue Jun 24, 2014 9:19 pm

Post by jimmyphong » Sat Dec 26, 2015 7:04 pm

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 !

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by mervyn » Sun Dec 27, 2015 4:19 pm

Thanks Jimmy will give that a shot, thanks

Mervyn

New member

Posts

Joined
Tue Jun 24, 2014 9:19 pm

Post by jimmyphong » Sun Dec 27, 2015 10:33 pm

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)) { ?>

News CMS || Plus SEO || Live Price change with Option Select


Active Member

Posts

Joined
Sat Aug 13, 2011 2:48 am


Post by mervyn » Mon Dec 28, 2015 4:25 pm

Thanks Jimmy very much all done now.

Best regards Mervyn

New member

Posts

Joined
Tue Jun 24, 2014 9:19 pm

Post by diljeet » Mon Feb 08, 2016 10:36 pm

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?

Newbie

Posts

Joined
Mon Feb 08, 2016 12:27 am

Post by OSWorX » Mon Feb 08, 2016 11:32 pm

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.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by parkookk » Wed Mar 02, 2016 10:31 pm

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?

User avatar
Active Member

Posts

Joined
Thu Jan 17, 2013 11:56 pm
Location - london
Who is online

Users browsing this forum: No registered users and 71 guests