Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Displaying a banner on top of page


horror_guy

Recommended Posts

Posted

Hello,

 

Im trying to display my banners in the header of my cart, instead of the footer. My banner works fine in the footer.php page but when I try and add it to header.php nothing happens.

 

Could someone please post the correct code needed to display random banners in the header?

 

Thank you,

 

 

 

Mark

Posted

About halfway down in catalog/includes/header.php:

 

 

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

<tr class="header">

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'yourlogo.gif', 'yourlogo') . '</a>'; ?></td>

</tr>

</table>

 

 

 

Make sure that you have uploaded your banner to catalog/images!

 

Patrick

Patrick Bailey

www.DisplayHaven.com

Posted

the default code you're looking for will have (DIR_WS_IMAGES . 'oscommerce.gif', 'oscommerce') instead of what i typed above.

Patrick Bailey

www.DisplayHaven.com

Posted

Hi Patrick,

 

Yeah I have my store logo in the header area, that works okay, but im wanting to put a product banner above it, that shows a current product promotion that im running. I've got a banner created, but need to have it placed above my store logo, and alternate randomly between different product banners between refreshes.

 

eg All Dvds 20% off!

 

Something along those lines.

 

Thanks,

 

 

 

Mark

Posted

Ok, well i'll show you what i have...and you can figure out the rest hopefully....

 

Here is my header gif's area:

 

<div style="text-align: center; background: white; margin: 0;">

<div style="text-align: left; margin: 8px auto; width: 890px;">

 

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

<tr class="header">

<td valign="middle" align="left"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'havenlogo.gif', 'Haven') . '</a>'; ?></td>

<td valign="middle" align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'pics.gif', 'Haven') . '</a>'; ?></td>

<td valign="middle" align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'words.gif', 'Haven') . '</a>'; ?></td>

</tr>

</table>

 

 

--Now the top section (two divs) will allow you to define the size of your page so that it shows up the same size on every browser...i use this contrib. with multiple header images so that i can set the distance between the three images i have listed and make sure they look that way on other peoples webbrowsers.

 

--I'm thinking to put one above your main header you could do a <td valign="bottom" align="center"> for your main header image and a <td valign="top" align="center"> and that would put one above the other...let me know if this works...just upload your promo gif and imput it where i have words.gif or havenlogo.gif or pics.gif and mess with the valign, align commands...

Patrick Bailey

www.DisplayHaven.com

Archived

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

×
×
  • Create New...