Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How To Change Heading Title On Category Page


Guest

Recommended Posts

Hi, I want to change the "Let's see what we have here" title on the catagory page but I don't just want to edit the language file and have an alternative fixed title.

 

What I want to do is when a category is clicked I want the title to show the category the customer is viewing. I want to change the fixed title to showing the category name. I have done it before a long time ago but for the life of me I can't remember how.

 

Thanks Guys & Gals

Link to comment
Share on other sites

use this code

 

if (isset($cPath) && tep_not_null($cPath)) {
	$category_query = tep_db_query("select cd.categories_name, c.categories_image 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);

	echo $category['categories_name'];

}

KUBICO from Portugal

Link to comment
Share on other sites

use this code

 

if (isset($cPath) && tep_not_null($cPath)) {
	$category_query = tep_db_query("select cd.categories_name, c.categories_image 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);

	echo $category['categories_name'];

}

Thanks a bundle for the reply. I completely forgot to mention that I am using the graphical borders contrib which adds a graphical header bar of the main page area and I tried your fix which works outside of this header but I don't seem to be able to intergrate it into the header bar.

 

http://www.coolnquiet.co.uk/index.php

 

Thanks Again and more if you can solve this for me.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...