Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing Header "Categories"


jonamac

Recommended Posts

I need to change the heading title from "Categories" to be the actual name of the category represented. Please see the two screen captures below.

 

Does anyone know how I do this????

 

header_help.jpg

"Tell me how to make it stop!" - Chris Stamey, The dB's

Link to comment
Share on other sites

Hi,

 

go to...catalog/includes/languages/english.php.

scroll down this page where you will find all the headings for the page and the info. boxes. categories is around line 72...

 

// categories box text in includes/boxes/categories.php

define('BOX_HEADING_CATEGORIES', 'Categories');

 

Change to this...

 

// categories box text in includes/boxes/categories.php

define('BOX_HEADING_CATEGORIES', 'Your Own Category');

Link to comment
Share on other sites

I need to change the heading title from "Categories" to be the actual name of the category represented.  Please see the two screen captures below.

 

Does anyone know how I do this????

 

header_help.jpg

 

 

i have this before

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

 

 

$category_query = tep_db_query("select cd.categories_name, c.categories_image, c.parent_id 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);

$parent_id = $category['parent_id'];

if ($parent_id > 0) {

$category_parent_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category['parent_id'] . "' and language_id = '" . (int)$languages_id . "'");

$category_parent = tep_db_fetch_array($category_parent_query);

$parent_name = $category_parent['categories_name'];

$sep = ' - ';

}

else {

$parent_name = '';

$sep = '';

}

 

 

 

and this where it normally said HEADING_TITLE :

 

 

<td class="pageHeading"><?php echo '<H2>' . $parent_name . $sep . $category[categories_name] . '</H2>'; ?></td>

Treasurer MFC

Link to comment
Share on other sites

That worked on the main Product Category pages. Thanks!!!! - Now I have to get it to work on the Product pages. Is this a similar thing???

 

i have this before

 

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

$category_query = tep_db_query("select cd.categories_name, c.categories_image, c.parent_id 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);

$parent_id = $category['parent_id'];

if ($parent_id > 0) {

  $category_parent_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category['parent_id'] . "' and language_id = '" . (int)$languages_id . "'");

  $category_parent = tep_db_fetch_array($category_parent_query);

  $parent_name = $category_parent['categories_name'];

  $sep = ' - ';

}

else {

  $parent_name = '';

  $sep = '';

}

and this where it normally said HEADING_TITLE :

            <td class="pageHeading"><?php echo '<H2>' . $parent_name . $sep . $category[categories_name] . '</H2>'; ?></td>

"Tell me how to make it stop!" - Chris Stamey, The dB's

Link to comment
Share on other sites

That worked on the main Product Category pages.  Thanks!!!! - Now I have to get it to work on the Product pages.  Is this a similar thing???

 

 

not really, there I just use :

 

<td class="pageHeading" valign="top"><H2><?php echo $products_name; ?></H2></td>

 

no need to add the path to that I thought.

Treasurer MFC

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...