Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

banners In Header


Guest

Recommended Posts

Is anyone able to help ?

 

i am trying to set my heading to background and then place a banner on the right hand side of the page?

 

is there a code for this? or is it in my file manager panel ?

 

Pete

Link to comment
Share on other sites

Do not use your file manager... ever.

 

To make the image a background you need to edit the cell.

Open catalog/includes/header.php with whatever editer you are using after you have downloaded it to your computer using an FTP program.

 

Look for

<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 . 'oscommerce.gif', 'osCommerce') . '</a>'; ?></td>
   <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>
 </tr>
</table>

That is the table with the osCommerce banner image in it and the 3 images on the right.

Here is an example of what I think you are talking about doing.

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
   <td valign="middle" background="images/yourimage.jpg"><?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
 }
?></td>
   <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>
 </tr>
</table>

But I left the 3 mages on the right so not sure exactly if that will work but you should be able to figure out how to change it from there.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Thanks for that i will give it a try

 

the only problem is i did try loading something else using the file manager and now i cant see my pages anymore....

 

silly me ... i never learn

 

can you reset the template but leave your products on the database

 

HELP PLEASE

 

Thanking u in advance

 

Pete

Link to comment
Share on other sites

To "reset" the store...

If your store has no modifications... like contributions installed, the easiest thing would be to reupload the install folder, if you have deleted the original one, then run the install again MAKING SURE (sorry for the caps but this is important lol) you uncheck the box that says import database. Don't forget to set all the permissions correctly to install (both configure.php files) and then after install. (those 2 files again and your images folder)

 

This will allow you to have a fresh install of osCommerce AND keep your database so you don't have to set everything back up again.

 

You can also do this if you have contributions installed but you will have to go back over the install instructions for every contribution and do everything they say but add the SQL information.

 

I would definately suggest you back up the database onto your hard drive which is a very easy thing to do. Just log into your phpmyadmin, click on your database name if it isn't already selected. Select Export from the top left, then on the new page do select all. Now you may have other options. Different versions of phpmyadmin are a bit different but that should be all you need to do. The save it to your hard drive naming it something you will remember.

 

Hope that makes sense and helps.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Thanks for your help wendy

 

i am still having trouble with re-setting my templates, this is the first time i have had to do it !!! all i have up loaded in the past is a few pictures but havent uploaded entire files through FTP can you point me in the right direction to get this to happen ??

 

Pete

Link to comment
Share on other sites

Well since you said you did try to edit some files in the file manager you should download the osCommerce zip file. Unzip it on your hard drive. Find the catalog folder inside there and upload everything you find in there to the folder on your server to where all your osCommerce files are. If you look at the files you should be able to see what needs to go where. Just compair file names.

 

How you upload it is the same way as you would upload your images.

Hope this helped.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

hey all .... i have 1 small problem with the code that i have put on my page .....

 

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

<tr class="header">

<td valign="middle" background="images/yourimage.jpg"><?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

}

?></td>

<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>

</tr>

</table>

 

i have placed this code in my header page and seems to have worked but now i dont have my company heading logo ..... where has it gone ??

is something missing ?? all i wanted was for the banner to be placed ontop of my heading logo which is placed the entire width of the page

 

can anyone help fix this small problem

 

Pete

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...