Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

displaying category name


Guest

Recommended Posts

  • 1 month later...

This from a contribution

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.

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...