Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do i personalise it?


Guest

Recommended Posts

Didn't you read www.wiki.oscommerce.com as i suggested.

Spend some time there before you ask anymore

 

Anyway before I get really humped

 

"In header.php change:

 

 

<td valign="middle"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'OSCommerce'); ?></td>

 

That's what is says where I told you to look. I've just ahd to go there and get it for you. If you're too tired to look maybe you should a rest

 

:shock:

facts invariably distort the truth

Link to comment
Share on other sites

That helped.. Quick question.

 

 

Can I use swf of flash files in the headers as a logo.. If not, why not, and if yes... what do I need to do to make sure it is visible.. Please

 

Thanks

 

Didn't you read www.wiki.oscommerce.com as i suggested.

Spend some time there before you ask anymore

 

Anyway before I get really humped  

 

"In header.php change:

 

 

<td valign="middle"><?php echo tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'OSCommerce'); ?></td>

 

That's what is says where I told you to look. I've just ahd to go there and get it for you. If you're too tired to look maybe you should a rest

 

:shock:

~ Adversity is a severe instructor, ~

Link to comment
Share on other sites

In a stock osCommerce, this is the code that makes the header html:

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

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

 <tr class="headerNavigation">

   <td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>

   <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>

 </tr>

</table>

If you would like to add Flash to this, you would replace either the oscommerce.gif line or the header_*.gif line. If you replaced both, that section would look something like this:

  <tr class="header">

   <td valign="middle"><object data="TitleBarLeft.swf" WIDTH="634" HEIGHT="82" NAME="TitleBar" ALIGN="RIGHT" TYPE="application/x-shockwave-flash" /></td>

   <td align="right" valign="bottom"><object data="TitleBarRight.swf" WIDTH="634" HEIGHT="82" NAME="TitleBar" ALIGN="RIGHT" TYPE="application/x-shockwave-flash" />  </td>

 </tr>

for code that will validate as HTML Transitional. Others might add extras to make the flash load better.

 

To make the header a background for a bunch of links, you would change this in the header (to make the links and erase the foreground image):

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

and replace it with

<td align="center" class="header"> <a href="whatever">Link1 text</a> |  <a href="whatever2">Link2 text</a> | <a href="whatever3">Link3 text</a> </td>

Note: you can still use <?php ?> blocks with echo and tep_href_link if you are doing stuff within the code. However, if your links go outside osCommerce, you might find it easier to just right the html.

 

To get the background image in the header, add the following class definition to stylesheet.css:

TD.header { background-image: url(path/to/image.ext); }

Hth,

Matt

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...