Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Index image link to a product


mid9tblue

Recommended Posts

Hi:

I've found out that:

 echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'cPath=1') . '">' . tep_image(DIR_WS_IMAGES . 'image.jpg', 'category title') . '</a>';

is for the image that's placed on the index page to be linked to a category:

e.g. /index.php?cPath=1

then how should i change this code to allow the image to be linked to a product detailed page?

e.g. /product_info.php?products_id=105

 

I really want the link to be directed out of index.php and into product_info.php and look for products_id

Only I can't figure out how.

Appreciate the help, thx

Link to comment
Share on other sites

Hi

 

Try this

 

<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=105") . '">' . tep_image(DIR_WS_IMAGES . 'product.gif', 'product_name') . '</a>'; ?>

 

Regards

 

Ken

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...