Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to display 3 banners next to each other in Footer


emilesteenkamp

Recommended Posts

The default is to display a banner in the center in the footer. I want to display 3 small banners next to each other, left, center, right. What would the code be to do this. I have played around with the code but can't get them next to each other.

No outside links in signature allowed. See forum rules please.

Link to comment
Share on other sites

The default is to display a banner in the center in the footer. I want to display 3 small banners next to each other, left, center, right. What would the code be to do this. I have played around with the code but can't get them next to each other.

So, what happens when you use this code? What code did you try, anyway?

 

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td align="center"><?php echo tep_display_banner('static', 1) . tep_display_banner('static', 2) . tep_display_banner('static', 3); ?></td>
 </tr>
</table>

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

So, what happens when you use this code? What code did you try, anyway?

 

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td align="center"><?php echo tep_display_banner('static', 1) . tep_display_banner('static', 2) . tep_display_banner('static', 3); ?></td>
 </tr>
</table>

 

What is the "1" and "2" and "3"?

I changed the 1,2,3 to the banner $banner. Now it displays the same 3 banners at the same time, it must display 3 different ones in the same group

 

I replaced this bold code with yours but get errors on the frontpage now: <?php

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

?>

<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

}

?>

 

I want the banners in the 468x60 group to display next to each other in the footer, 3 - 5 small banners. I will change the group later.

No outside links in signature allowed. See forum rules please.

Link to comment
Share on other sites

What is the "1" and "2" and "3"?

 

I want the banners in the 468x60 group to display next to each other in the footer, 3 - 5 small banners. I will change the group later.

You should read about the banners in the documentation. the code I gave you puts STATIC banners number 1, 2, & 3 on the page. It will display the same three each time. If you want dynamic banners (rotating) you select the banner group to select them from, but there is no guarantees that you will always get three different banners there. If you want to always guarantee three different banners you will have to have three different groups with different banners in each.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

  • 3 weeks later...

You should read about the banners in the documentation. the code I gave you puts STATIC banners number 1, 2, & 3 on the page. It will display the same three each time. If you want dynamic banners (rotating) you select the banner group to select them from, but there is no guarantees that you will always get three different banners there. If you want to always guarantee three different banners you will have to have three different groups with different banners in each.

 

 

Please let me know how this one was solved. I am struggling to have multiple banners in my footer at the same time, I get error messages instead. I am sure there's something I'm missing in these instructions.

 

Felix

Link to comment
Share on other sites

Please let me know how this one was solved. I am struggling to have multiple banners in my footer at the same time, I get error messages instead. I am sure there's something I'm missing in these instructions.

 

Felix

Maybe if you show us your code we could help you. And a screenshot of your banner manager would help.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Maybe if you show us your code we could help you. And a screenshot of your banner manager would help.

 

 

Thanks for your time Mark, the original code is the following;

require(DIR_WS_INCLUDES . 'counter.php');

?>

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

<tr class="footer">

<td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>

<!-- <td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td> -->

</tr>

</table>

<br>

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

<tr>

<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>

</tr>

</table>

<?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

}

?>

</div></div>

 

And I would like to have three banners appearing simultaneously at the footer, I have read the documentation referred. I am a bit slow and certain I did not get it right

 

Appreciate your help

 

Felix

Thanks in advance

Link to comment
Share on other sites

Thanks for your time Mark, the original code is the following;

require(DIR_WS_INCLUDES . 'counter.php');

?>

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

<tr class="footer">

<td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>

<!-- <td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td> -->

</tr>

</table>

<br>

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

<tr>

<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>

</tr>

</table>

<?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

}

?>

</div></div>

 

 

And I would like to have three banners appearing simultaneously at the footer, I have read the documentation referred. I am a bit slow and certain I did not get it right

 

Appreciate your help

 

Felix

Thanks in advance

Link to comment
Share on other sites

Go to administration, Tools, Banner Manager. You need at least 3 banners for this to work.

 

Click on the LAST banner you have. Then, look at the URL in your browser. The last part of the url is "&bID=3" where the 3 could be any number. Click on each of the banners you have and record the numbers associated with each banner.

 

Now, in the code below, replace the 1, 2, or 3 with one of the numbers to your banners.

 

 

?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="footer">
<td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>
<!-- <td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td> -->
</tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>
</tr>
</table>
<?php
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><?php echo tep_display_banner('static', 1); ?></td>
<td align="center"><?php echo tep_display_banner('static', 2); ?></td>
<td align="center"><?php echo tep_display_banner('static', 3); ?></td>
</tr>
</table>

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Go to administration, Tools, Banner Manager. You need at least 3 banners for this to work.

 

Click on the LAST banner you have. Then, look at the URL in your browser. The last part of the url is "&bID=3" where the 3 could be any number. Click on each of the banners you have and record the numbers associated with each banner.

 

Now, in the code below, replace the 1, 2, or 3 with one of the numbers to your banners.

 

 

?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="footer">
<td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>
<!-- <td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td> -->
</tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>
</tr>
</table>
<?php
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><?php echo tep_display_banner('static', 1); ?></td>
<td align="center"><?php echo tep_display_banner('static', 2); ?></td>
<td align="center"><?php echo tep_display_banner('static', 3); ?></td>
</tr>
</table>

 

 

Thanks again Mark, but now I get the following messaged:

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/woiqqwab/public_html/includes/application_top.php on line 345

Link to comment
Share on other sites

Thanks again Mark, but now I get the following messaged:

 

Fatal error: Call to a member function add_current_page() on a non-object in /home/woiqqwab/public_html/includes/application_top.php on line 345

That is a typical (temporary) error caused by your browser using a cached page instead of the updated page on your server. Clear your cache and try again.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...