Guest Posted July 3, 2006 Posted July 3, 2006 In (catalog)/includes/english/index.php I have: define('HEADING_TITLE', tep_get_category_name($current_category_id, $languages_id) ); to show the current category name as the heading when viewing that category From what ive seen lookin around it seems the Manufacturers pages also use this HEADING_TITLE to display its heading.. But if im in a Manufacturers page its not gonna load a title as the code is saying to get the category name, not Manufacturers name. Is there a way to get this to work for both? Thanks
Wendy James Posted July 3, 2006 Posted July 3, 2006 From one of the contributions... Get rid of "Let's See What We Have Here" for SubCategories and "Categories" for Top-Categories. Replace them with the name of categories or Subcategories name. In the /catalog/index.php, there are three <?php echo HEADING_TITLE; ?> FOR CATEGORIES, just replace the first one <?php echo HEADING_TITLE; ?> TO <?php echo $category['categories_name'] ?> FOR SUBCATEGORIES, just replace the second <?php echo HEADING_TITLE; ?> TO <?php if (isset($HTTP_GET_VARS['manufacturers_id'])) { $category_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); $category = tep_db_fetch_array($category_query); if ($category['manufacturers_name'] != "") {echo $category['manufacturers_name'];} else { echo HEADING_TITLE;} } else { $category_query = tep_db_query("select cd.categories_name 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); if ($category['categories_name'] != "") {echo $category['categories_name'];} else { echo HEADING_TITLE;} } ?> The third <?php echo HEADING_TITLE; ?> Nothing needed to modify. Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.