Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding a CSS style to my product thumbnails


janetgot

Recommended Posts

Posted

Hi, I'm trying to add a simple CSS border around my thumbnail images in my product listing on a fairly old/modified osCommerce shop.

I'm trying to add the class to my product_listing.php file here:

 

case 'PRODUCT_LIST_IMAGE':

$lc_align = 'center';

if (isset($HTTP_GET_VARS['manufacturers_id'])) {

$lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a>';

} else {

$lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing[$x]['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing[$x]['products_image'], $listing[$x]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'class=shadow1') . '</a> ';

}

break;

 

But it doesn't show up on my page

 

<td class="productListing-data" align="center">

<a href="http://www.bountifulpantry.com/product_info.php?cPath=69&products_id=76">

<img width="150" height="150" border="0" title=" Country Corn Chowder " alt="Country Corn Chowder" src="images/bb_cornchowder_sm.jpg"/>

</a>

<br/>

<a href="http://www.bountifulpantry.com/product_info.php?cPath=69&products_id=76">Country Corn Chowder</a>

 

Am I putting it in the wrong place and/or did I add the code incorrectly? Note: the site has STS installed. Not sure if that moves where I should be formatting.

 

Thanks for any advice on this!

Janet

  • 2 weeks later...
Posted

For anybody who is looking to do the same thing, I figured this out... turns out this code is correct, however, I am using the product listing in columns module, so I needed to make this edit on my modules/product_listing_col.php and then it works. Yeah! Hope this helps somebody out there.

 

Janet

Archived

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

×
×
  • Create New...