Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image next to "oscommerce.gif"


1quicksi

Recommended Posts

You can use html but when you are linking to pages in your shop, they need to be done using OSC php functions to avoid losing session ID's. To add an image link beside the logo, find this code in catalog/includes/header.php

  <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 add your link the same was as shown

  <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 valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_PAGE_NAME) . '">' . tep_image(DIR_WS_IMAGES . 'some_image.gif', 'Alt Text goes here') . '</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>

The above will add an image named some_image.gif between the logo and the My Account image and will link that image to a page defined as FILENAME_PAGE_NAME. If you are gong to a page that is not yet defined, you can either define it in includes/filenames.php or just use 'pagename.php'.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 3 weeks later...

Do you mean linking to another website or another page?

 

The same would apply as per normal html :

 

<a href="http://www.blahdeblah.com">Blah!</a>

 

If you wanted it to load up in a new window, then make it

 

<a href="http://www.blahdeblah.com" target="_blank">Blah in a new window!</a>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...