applelinks Posted March 30, 2006 Posted March 30, 2006 hi i want to use the parent category image on the sub category page. When a category has subcategories. I want to use the parent category image as the 'header image' on all of the subcategory pages not the 'subcategory image' as the 'header image' i know/think this is the code that needs to be changed on the index.php page (see below) how can i get the image of the parent category thanks joe // 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']; } ?> <?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?> ---------------------------- Long Island, New York
Recommended Posts
Archived
This topic is now archived and is closed to further replies.