Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Heading Titles question


Guest

Recommended Posts

Posted

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

Posted

just turning on email notification

Posted

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.

Archived

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

×
×
  • Create New...