Magento Forum

Home Page Rotating Banner Change on User Hit
 
zbabyface
Jr. Member
 
Total Posts:  3
Joined:  2012-03-26
 

I need to change the Home page rotating banner based upon the user leaving the page and returning to the home page, such that the user then sees a new rotating banner instead of the same one they just saw.... so far… here’s where I’m at:

CMS Page
{{block type="cms/block" block_id="my_block" template="cms/content.phtml"}}
----code in .phtml page:

$r = mt_rand(1,3); // get a random number: 1-3 inclusive
if ($r == 1) return 10;
if ($r == 2) return 11;
if ($r == 3) return 12;

Can anyone send me in the right direction?

Thanks!!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
robbiebarrer
Jr. Member
 
Avatar
Total Posts:  11
Joined:  2012-09-24
 

Hi there, It would help a lot to understand your exact problem if you provided more details. A bit of more code if possible.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top