Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Banner Display Fix


Guest

Recommended Posts

I tried to get my affiliate banners to display at the footer of my pages but they failed to show up. They had a different dimension than the supplied OSCommerce banner.

 

The fix for this issue was to simply open footer.php and edit the following line;

 

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

 

to

 

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

 

I am sure that another method must exist but since this is the only size I use, it works great.

Link to comment
Share on other sites

Cool. I actually just found out it does not matter the size of the banner what matters is that the banner group name is the same as what is in footer.php I had a group called 468x50 & my banner was 468x60 & showed up as that size. After I read your post I changed the footer.php to 468.60 & the banner didn't show up. So I created a new group called 468x60 & the banner is up again. :D

Knowledge is Power!

Link to comment
Share on other sites

Well, sounds like you learned more than I did. I did not try that but now that I think about it I guess that is how it will work. I have only been sticking my nose in PHP for about a year now so I am learning.

Link to comment
Share on other sites

  • 1 month later...

i wouldn't consider it a bug.

it is designed to allow you to specify groups. that is all the 468x50 does.

its a name of the banner group. for that manner, you could name the group banners and put all your banners in banners group and it would work.

i did something like that but my group is 468x60

the banners are different sizes and i put it in the header.

The code for the header is:

	<?
 if ($banner = tep_banner_exists('dynamic', '468x60', '0')){
  echo tep_display_banner('static', $banner);
 }
?>

I included it because someone had my show_banners.php file singled out and I assume to see the code. Kind of strange that they pulled that file because I am not calling it anywhere in my site.

But for that person that was trying to look at the code:

<?php
 include('includes/application_top.php');
 if ($banner = tep_banner_exists('dynamic', '468x60', '0')){
  echo tep_display_banner('static', $banner);
 }
?>

 

None of the above is my code. I used show_banners.php and tweaked it for my use. Also looked at another reference here in the forums to form this solution that allows both header banners and allows you to display banners on other sites.

 

All the person has to do is use an include call referencing your show_banners.php or use an IFRAME to reference it.

Link to comment
Share on other sites

this made me every happy :)

 

 

finally got the banner in ...it's only a flash banner and it wont work :)

 

but ey , another step forward , first i didn't see the banner

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
this made me every happy :)

 

 

finally got the banner in ...it's only a flash banner and it wont work :)

 

but ey , another step forward , first i didn't see the banner

A flash banner wont work unless you code it in....You would have to modify the footer and have the necessary flash code embedded in the script...I will be doing somewhere down the track..Should be pretty easy to do...just look at a website with a flash banner and get the necessary code and play around with it.,,

Link to comment
Share on other sites

  • 4 weeks later...

ok guys. Mabey I'm reading greek but I'll be the first to admit I'm lost. I have tried several changes to the footer.php and changing the locations of the banners themselves but I can't get them to display. RIght now I have a clean install of OSC and everything is default. According to the banner manager I have 3 active banners in the system and they show good but 0 impressions and of course I see nothing at the footer either regardless of where I browse the catalog. Can someone bring this down to nubie level and tell me what to fix and where?

Link to comment
Share on other sites

<?

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

echo tep_display_banner('static', $banner);

}

?>

 

Look for the code above in one of the pages. I'm sorry, I can't remember which page it is and I don't have time to look right now, but you could do a search for it. Anyway, see the '468x60' part? Change that to 'yourbannergroupname', and it will show up. It drove me nuts too, and I didn't figure it out till the third site I built!

 

Victoria

Link to comment
Share on other sites

I have read every post. I am even more of a newbie to PHP than y'all

 

these fixes make no sense to me. Why would changing the 468 x 50 to 468 x 60 make ANYTHING work? Changing size values? Why, when everyone says adding the groupname is what is nec.?

Why doesn't OSC make it's own changes when we make the banners and set the groups?

 

What if you have more than one banner group? I can only show one group at a time?

 

Thanks

 

D

Link to comment
Share on other sites

anyone please?

 

I cannot find SHOW BANNERS PHP file like mentioned in the previous posts.

 

FOOTER php and HEADER php make no mention of banners at all. There is no code like mentioned in previous posts with a banner parameter for me to fiddle with.

 

I have 5 banners made and loaded in 2 groups.

 

How can I get my banners to show up?

 

Thanks

 

D

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...