Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multiple images per category (not item)


vinesun

Recommended Posts

Posted

What I'm trying to do is change the image associated with the "let's see what we have here" text. I've figured out that the image placed there is the category image and that the code that does that is in index.php. I don't want to get rid of the image, but I want a different category image to be used instead. Basically, my category image is too big for that area and I want a smaller image for the "let's see what we have here" image. Simply resizing the existing image isn't an option, either.

 

If I'm not mistaken, this is the code that I'd have to change. I also think I'd have to do something with my database as well. I just have no idea how.

 

// Get the right image for the top-right

$image = DIR_WS_IMAGES . 'table_background_list.gif';

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

$image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

$image = tep_db_fetch_array($image);

$image = $image['manufacturers_image'];

} elseif ($current_category_id) {

$image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");

$image = tep_db_fetch_array($image);

$image = $image['categories_image'];

}

Archived

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

×
×
  • Create New...