Page 1 of 1

Can't get favicon to work

Posted: Sat May 12, 2012 3:48 pm
by pkennedy1
Hi,

I've been trying to get my favicon to work but to no avail.
Things I have tried are:
1. I have favicon.png in my images/data folder and have selected in via the admin control panel.
2. uploaded favicon.ico to my site root and edited my header.tpl to include <link href="http://www.thehypnolounge.com/favicon.ico" rel="icon" />

Also tried option 2 with a png version of the icon.

The live source code on my homepage includes <link href="http://www.thehypnolounge.com/favicon.ico" rel="icon" /> in the head section and the file is there, but still it won't show up on IE8.

How can something so simple be so frustrating - any suggestions welcome.
Thanks

Re: Can't get favicon to work

Posted: Sat May 12, 2012 4:01 pm
by adu
From my experience it's like that you just simply rename your png to .ico
you have to have some program like photoshop or something can save your favicon as an .ico file, otherwise the IE won't show your favicon.ico, but all others can show it, like firefox.
IE just wont show your PNG file.

or you can google it, there are alot of site can transfer those image to .ico file.

Re: Can't get favicon to work

Posted: Sat May 12, 2012 7:16 pm
by pkennedy1
Thanks Adu,
I thought you could just rename my png file to ico.

So I converted the png to ico via some online tool and I posted the newly created favicon.ico to the root of my site, and with <link href="http://www.thehypnolounge.com/favicon.ico" rel="icon" /> hardcoded in my header.tpl - still no joy.

Re: Can't get favicon to work

Posted: Sat May 12, 2012 7:41 pm
by labeshops
You did more than you needed to really. All you needed to do was in admin > settings > your store > image upload a file for the icon. As it states on it, "Icon: The icon should be a PNG that is 16px x 16px."

Works perfectly for my stores.

Re: Can't get favicon to work

Posted: Sat May 12, 2012 7:50 pm
by pkennedy1
Thanks.

I can't see your favicon's either so it must be IE.
Cheers

Re: Can't get favicon to work

Posted: Sat May 12, 2012 7:55 pm
by labeshops
That's possible. I haven't used IE in years.

Re: Can't get favicon to work

Posted: Mon May 14, 2012 4:32 pm
by adu
it should be good now, since i can see it by IE.
it takes time for IE to fresh your icon.

Re: Can't get favicon to work

Posted: Fri Dec 28, 2012 4:05 am
by wscribner
labeshops wrote:You did more than you needed to really. All you needed to do was in admin > settings > your store > image upload a file for the icon. As it states on it, "Icon: The icon should be a PNG that is 16px x 16px."

Works perfectly for my stores.
Mine doesn't work at all. I did this in admin exactly as this says, and it doesn't work. I've also tried adding the <link> to the header.tpl, and still no go. What else could it be?? Mine doesn't show up in ANY browser....

Re: Can't get favicon to work

Posted: Wed Feb 27, 2013 4:50 pm
by Renato Frota
fyi,

you should add a second <link> line, with rel="shortcut icon" for IE compatibility

also, I recommend type="image/x-icon"

Code: Select all

<link href="<?php echo $icon; ?>" rel="icon" type="image/x-icon" />
<link href="<?php echo $icon; ?>" rel="shortcut icon" type="image/x-icon" />

Re: Can't get favicon to work

Posted: Tue Aug 20, 2013 1:31 am
by mason1939
1) png favico,which used by opencart, isn't accepted by IE.so you have to make your ico favicon.
http://www.favicon.cc/ is a highly recommended site.

2) upload your ico favicon to your site.

3) replace <?php if ($icon) { ?>...<?php}?> section in header.tpl with the following codes.

Code: Select all

<?php if ($icon) { ?>
<?php
$user_browser = $_SERVER['HTTP_USER_AGENT']; 
if(strpos($user_browser,"MSIE")){?>
<link href="your-site/image/favicon?v=2" type="image/x-icon" rel="shortcut icon" />
<?php }else{?>
<link href="<?php echo $icon.'?v=2'; ?>" rel="shortcut icon" />
<?php }} ?>
it works fine for me.

BTW, adding 2 link tag specifying favicon doesn't work in IE 10.