Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Link image or banner to specific product detail


Moleiro

Recommended Posts

Posted

I have 2 images in the main shop.

I want to add a link in this image to a particular product detail or to a certain manufacturer, kind of a highlight to a product or group of products in the main page.

Imagine that I recieve may products from the xpto brand I want to put a a image highlighting those products and the user by clicking the image will recieve the list of all the products from that xpto brand. Or link to a product detail directly from that image.

 

By default the image(s) are linkind to products_new.php like this:

 

<a href="<?=tep_href_link('products_new.php')?>"><?=tep_image(DIR_WS_IMAGES.'p2.jpg')?></a>

 

Istead of link it to products_new I want to link to all the products from manufacturer x or z. Or link the image to the y product.

 

I know when the list of products from a certain manufacturer is displayed is like this:

 

catalog.com/index.php?manufacturers_id=27

 

I just don't know how to do the link

 

Help Please

 

Thank you in advance.

Posted

I have been searching for the same answer as you. I think I have figured it out. Here is a sample of the code from by site so you can see what I'm talking about. This example code should link you to a specific product item in your store. "(FILENAME_PRODUCT_INFO)" I guess links to the product page that pulls all the products from the data base. Then ('products_id=#') pulls the product that you want to link to. In the admin section under the catalog find the item and click on it to high light it. Then at the bottom of the section to the right you should see the following words "[ Quick List Attributes for Product ID# # ]". This is the product # you us to fill in the ('product_id=#'). Then of course you need to change the pic and link to it as well.

 

<a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=1') ?>"><?php echo tep_image(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/images/banner1.jpg')?></a>

 

 

Like I said I'm not sure if this will work as I have not got a chance to test this as I think that I have just pull all the pieces together. I will be trying this out later today to see if it truly works.

Archived

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

×
×
  • Create New...