Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to add banners


kiwijoyce

Recommended Posts

I already added one at 468x50 (whatever that means..?) through admin/tools/banner manager, but now I want to add another banner to my page, but I don't really know how. It's all in the little scroll down option, but I would need some help :) Anybody ??

Link to comment
Share on other sites

Create a new banner with a new banner group (for instance call it 450x450) ... then simply paste this code where you want the banner to be displayed:

 

<?php
 if ($banner = tep_banner_exists('dynamic', '450x450')) {
?>
<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
 }
?>

 

Take note of this line: if ($banner = tep_banner_exists('dynamic', '450x450')) { ... the 450x450 needs to be the banner group you want to display in this location (the new banner group you created in your banner manager)... you can do as many groups as you want ... then simply paste that code where you want that particular banner displayed and making sure you change the banner group in the code to reflect which banner group you want to display

You can call your banner group whatever you want ... just make sure that whatever you named your banner group on the banner manager, you change the 450x450 part in that code to reflect the same name

Link to comment
Share on other sites

Sounds like I can do all this, but where do I place that code ? In which file?? I used the banner manager in the admin section and there I do not have space to add bits of code though.

 

You need to add that code to your PHP files ...

 

Where you place it is up to you and where you want to display it ... where abouts would you like this banner displayed?? Which page? every page??

 

Lemme know

Link to comment
Share on other sites

You need to add that code to your PHP files ...

 

Where you place it is up to you and where you want to display it ... where abouts would you like this banner displayed?? Which page? every page??

 

Lemme know

 

 

Yeah, every page -at the very bottom or side- basically in the background if I make myself clear enough.

Link to comment
Share on other sites

If you want to have a look www.bugs.co.nz I have the one banner placed where the original OSC used to be. I don't know how to position them on the page, does that have to do with the

 

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

 

line in the code ?

 

Also your code says 'static' banner, does this mean they can not be links ??

I want to add banners that are links to other business groups in my field that I belong to.

Link to comment
Share on other sites

If you want to have a look www.bugs.co.nz I have the one banner placed where the original OSC used to be. I don't know how to position them on the page, does that have to do with the

 

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

 

line in the code ?

 

Also your code says 'static' banner, does this mean they can not be links ??

I want to add banners that are links to other business groups in my field that I belong to.

 

Hi, sorry for the late reply havn't been online till now..

 

This bit of code <?php echo tep_display_banner('static', $banner); ?> will display the banner wherever you place it ... if you want it on every page I would suggest placing it in /catalog/includes/footer.php

 

The 'static' means it will only display the one banner ... if you have more than one banner in the same banner group you can change the 'static' to 'dynamic' which will select a random banner from that group and display it ... so change it to <td align="center"><?php echo tep_display_banner('dynamic', $banner); ?></td>

Link to comment
Share on other sites

Hi, sorry for the late reply havn't been online till now..

 

This bit of code <?php echo tep_display_banner('static', $banner); ?> will display the banner wherever you place it ... if you want it on every page I would suggest placing it in /catalog/includes/footer.php

 

The 'static' means it will only display the one banner ... if you have more than one banner in the same banner group you can change the 'static' to 'dynamic' which will select a random banner from that group and display it ... so change it to <td align="center"><?php echo tep_display_banner('dynamic', $banner); ?></td>

 

 

Thanks for your help I can manage now !! Just finding out about the spacing between 2 banners now, but I'll get there.

Thanks again. ~ I love the forum !

Link to comment
Share on other sites

  • 1 month later...
Thanks for your help I can manage now !! Just finding out about the spacing between 2 banners now, but I'll get there.

Thanks again. ~ I love the forum !

 

 

I have a problem with the url of the banner. I want to change the link associated with the banner to point to another website outside of my store. How do I do that?

Link to comment
Share on other sites

  • 10 months later...

Is this your shop?

I am wondering how I can create this kind of layout..

 

 

yes.. for that one ?? its simple just create an image for your background .. upload it on your images folder then change the names here on /home/camerace/public_html/shop/stylesheet.css

 

BODY			{color:#353434;margin:0px;padding:0px 0px 0px 0px;}
.bg2_body	{background:url(images/name.jpg) center 100% no-repeat #0C3D5B; height:100%}
.bg3_body	{background:url(images/name.jpg) center 0px no-repeat; 

 

thats how i worked with mine..

 

or just pay me to do that .. haha just kidin..

 

anyway can somebody tell me what part i can edit the codes of my banner on the homepage.. i can change it from the banner manager but i want it to be dynamic so itl be randomize ? pls help i dont know where is the codes of this attached into.!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...