Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Make New Box w/Image Only


garysgal

Recommended Posts

I want to add a box to my right_column.php that's simply an image ("Deal of the Day") that links to a "specials" page... I've followed the instructions to add the box, but apparently adding an image rather than text is causing problems... any help for me? Thanks!

Link to comment
Share on other sites

Open the right column box you want to add the image underneath (includes/boxes/specials.php for example) and add this after the closing </tr>

 

<tr>

<td><?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS) . '">'; ?><img src="images/yourimagename.gif" alt="Specials" title="Specials"></a></td>

</tr>

Link to comment
Share on other sites

Thank you. I'm not using a separate page, per se - I'll be linking the image to a specific product that changes on a 24-48 hour basis... where or how would I insert the "href" code to link the image to the correct page?

Link to comment
Share on other sites

Well for that you need to get the product id of the product you want to show. CLick the product to go to the product_info page - take a look at the URL - it'll look something like this:

 

http://somewebsite.com/product_info.php?products_id=6

 

So then use this code to create your button in the right column that links to that product. I have highlighted the extra bit in bold:

 

<tr>

<td><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=6') . '">'; ?><img src="images/yourimagename.gif" alt="Specials" title="Specials"></a></td>

</tr>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...