spencermjax Posted November 4, 2006 Share Posted November 4, 2006 Anyone know how I could place the current category image on the product_info page? Link to comment Share on other sites More sharing options...
spencermjax Posted November 4, 2006 Author Share Posted November 4, 2006 I found this bit of code <?php echo tep_image(DIR_WS_IMAGES . $category['categories_image']); ?> It seems that it would work but there is no SQL that defines $category....so no image. Link to comment Share on other sites More sharing options...
spencermjax Posted November 4, 2006 Author Share Posted November 4, 2006 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.