Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Would like help to make a rotating banner

Would like help to make a rotating banner

Views: 4,652

Results 21 to 22 of 22
7 Jan 2012, 11:51 AM
#21
bridge32 avatar

bridge32

Zen Follower

Join Date:
Jun 2011
Posts:
145
Plugin Contributions:
0

Would like help to make a rotating banner

I have now gone to Odesk to see if i can get someone to rectify this problem as it seems it is beyond myself to do it.
I would like to thank Bryan and others who have tried to assist me in sorting this out, it is appreciated.
Thanks again
Nic.

31 Mar 2012, 8:36 PM
#22
shk avatar

shk

New Zenner

Join Date:
Oct 2006
Posts:
62
Plugin Contributions:
0

Re: Would like help to make a rotating banner

bn17311:

hi,
i actually use the following code in tpl_index_default.php

then go in and create a banner using your images and give it a group name of slider

hope this helps. im not an expert but do use the code from the site supplied

bryan

<!-- bof Easy Slider 1.7 --> <div id="container"> <div id="content"> <?php

global $db;
$sql = "SELECT banners_title,banners_url,banners_image FROM ".TABLE_BANNERS." z where status='1' and banners_group ='Slider'";
$result = $db->Execute($sql);
$path = HTTP_SERVER.DIR_WS_CATALOG.DIR_WS_IMAGES;
if ($result->RecordCount() > 0) {
echo '<div id="slider"><ul>';
while (!$result->EOF) {

echo '<li><a href="'.($result->fields['banners_url']).'"><img src="'.$path.($result->fields['banners_image']).'" class="clip" title="'.($result->fields['banners_title']).'" /></a></li>';

$result->MoveNext();
}
echo '</ul></div>';
} else {
echo 'no value';
}
?>

</div> </div> <!-- eof Easy Slider 1.7 --><div class="clearBoth"></div> <?php } ?> <!-- eof Easy Slider 1.7 --> ``` **Using this code, no banner Displays / Clicks are counted. Is there any way to fix that?**

Other than that it works great. I added this so the slides follow the sort order.

." order by banners_sort_order"