Page 1 of 1

Rotating Store Logos

Posted: Mon Feb 06, 2017 4:51 pm
by Gobbo
Hi,

I have designed three logos with different tag lines, so is it possible to have rotating logos. So every time the page is reloaded a new logo at random is displayed?

Re: Rotating Store Logos

Posted: Mon Feb 06, 2017 11:10 pm
by rjcalifornia
Use javascript:

Code: Select all

<script language="JavaScript">
 function banner() { } ; b = new banner() ; n = 0
 b[n++]= "<img name=randimg src='images/me.jpg' >"
 b[n++]= "<img name=randimg src='images/me2.jpg' >"
 b[n++]= "<img name=randimg src='images/me4.jpg' >"
 b[n++]= "<img name=randimg src='images/me5.jpg' >"
 b[n++]= "<img name=randimg src='images/me6.jpg' >"
 b[n++]= "<img name=randimg src='images/me3.jpg' >"
 i=Math.floor(Math.random() * n) ;
 document.write( b[i] )
 </script>

Re: Rotating Store Logos

Posted: Tue Feb 07, 2017 2:13 am
by Gobbo
Hi rjcalifornia,

In what file does this go?

I've tried to look in firebug, but its not showing me.

Re: Rotating Store Logos

Posted: Tue Feb 07, 2017 9:28 pm
by fido-x
The code would go at the end of catalog/view/theme/default/template/common/header.tpl.

If you're using a custom theme, then the code would go in catalog/view/theme/your_theme/template/common/header.tpl

Re: Rotating Store Logos

Posted: Wed Feb 15, 2017 9:39 pm
by Gobbo
Thanks