Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Duplicating Banner Function


ozcsys

Recommended Posts

We Decided that we wanted two seperate set of banners so I duplicated the banner function in the database, filenames and database_tables.php , english file and admin etc. renaming the second set of files. The admin seems to work ok.

 

The name for the duplicate file in the functions folder is banner2.php

 

The problem is in getting the new banner to show up. Any changes I make to the code in the footer gives me error messages.

 

<?php

if ($banner = tep_banner_exists('dynamic', '468x50')) {

?>

<br>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>

</tr>

</table>

<?php

}

?>

 

Any help or ideas would be great

 

Thanks

 

Richard

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

A different approach(you don't need to do the file mods you mention above):

 

Add a banner, using 468x50, in admin that you want to appear in the new group. Then go into the DB and change the code from 468x50 to 468x70 for that banner.

 

You then have two banner sets 468x50 and 468x70 so put the relevant code where you want the different sets to appear i.e.:

 

<?php
if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
</tr>
</table>
<?php
}
?>

 

or

 

<?php
if ($banner = tep_banner_exists('dynamic', '468x70')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
</tr>
</table>
<?php
}
?>

 

And when you add banners just choose from the dropdown list which group you want it in.

Your online success is Paramount.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...