Guest Posted December 15, 2005 Share Posted December 15, 2005 Would anyone know how I can place an image of my choice at the top of each page of each cetegory? I want to be able to show one large picture of the product being used for each category at the top of each page. Example: If I were selling umbrellas I want to show a person with an umbrella at the of the page. Thanks for your support. Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2005 Share Posted December 15, 2005 each category can have an image assigned to it. So you could move the code that shows the image to the header. From catalog\index.php to catalog\includes\header.php The line for the image to move is <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> Has to be modified slightly. Rename the $category to $categories. Then you also need the sql query to inlcude the categories_image column. So you could change the application_top.php this line: $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'"); to this line: $categories_query = tep_db_query("select c.categories_image, cd.categories_name from " . TABLE_CATEGORIES c left join TABLE_CATEGORIES_DESCRIPTION . " cd on (c.categories_id=cd.categories_id) where c.categories_id = '" . (int)$cPath_array[$i] . "' and cd.language_id = '" . (int)$languages_id . "'"); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.