Community Add-Ons

Add file to this package
Top » Features

Index Ads - Banners in body_text version 1.0
for osCommerce Online Merchant v2.2

BACKUP! This works for me, but there is no guarantee it will work for you.

This module is designed to display small banners at the top of your index.php page (in the body section), all of which will link to internal cateogories, products, infomation pages, etc. You've probably seen this on larger websites. The images are displayed in 3 columns, as many rows as you want. The positions are numbered like this:

1 | 2 | 3
4 | 5 | 6
7 | 8 | 9
etc.....

The module selects a random image that was defined for that position. For example, I could have 10 images that rotate in position 5, 1 image always in position 1, 3 in position 6, etc.

You upload these banners using the regular banner manager. Read the included txt file for more info.

Some improvements needed in the future:
- Record index ad banner clicks
- Use tep_display_banner and integrate into redirect function

Legend:  Download   Report
Expand All / Collapse All
shopping cart content lost juniorprg 8 Nov 2006  

When i used this contribution, which i should admit is fantastic , showed a problem with cart content being lost when clicked on the banners, so i made a small change to the coding,

modules/index_ads.php change to this:
//Put the banner string in the array position
$info_box_contents[$row][$col] = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $banner['banners_url']) . '">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';

..............................
basically what i did was refer to products_id instead of banner url...

so in the admin/banner manager, instead of putting the url, just insert the product id... i feel this is much better..

the download holds only the fix

Index Banner Ads in Rows kayakbabe 26 Sep 2005  
Index Ads - Banners in body_text Support Forum Dan Sullivan 14 Jul 2004  
Index Ads - Banners in body_text version 1.0 Dan Sullivan 14 Jul 2004