Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Index.php Image with Category Link How


TDK

Recommended Posts

Hi TDK-

 

You can make your image into a link like this.

 

<tr>
<td><?php echo '<a href="' . FILENAME_YOUR_NEW_LINK . '">' . tep_image(DIR_WS_IMAGES . 'your_image_filename.jpg', TITLE_ALT_TEXT) . '</a>'; ?></td>
</tr>

 

Where FILENAME_YOUR_NEW_LINK is a webpage you define in:

*catalog*/includes/filenames.php

define('FILENAME_YOUR_NEW_LINK', 'webpage_link.php');

and,

where 'your_image_filename.jpg' is an image in your *catalog*/images directory

and,

where TITLE_ALT_TEXT is the alt text you define in:

*catalog*/includes/languages/english/index.php

define('TITLE_ALT_TEXT', 'Image title or website description');

 

Danny

If I'm giving advice, it is based on what path I would take to fix your problem. My path may be wrong.

Link to comment
Share on other sites

To link to an existing category in your store you need to find out the link (easy.. just select the category then look in your browsers address) then link the image.

 

for example

<a href="' . tep_href_link('index.php' , 'cPath=21') . '"><img src="images/yourimage.jpg" /></a>

 

cpath=21 is a category page

Wendy James

 

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...