Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

current category image on the product_info page?


spencermjax

Recommended Posts

I am not good with this stuff but I sure can hack it up.

I hope this will not have unintended consiquences but this is what I did:

 

took this code from index.php:

	$category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
$category = tep_db_fetch_array($category_query);

 

Added the above code to product_info.php just under this line (near the top):

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 

then Added this code where I wanted the image to be:

<?php echo tep_image(DIR_WS_IMAGES . $category['categories_image']); ?>

 

I modified the line of code above from this original line of code:

<?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?>

 

 

 

USE AT YOUR OWN RISK!

As I said, I'm a hack.... :-"

Hope this helps.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...