everyth5 Posted June 28, 2006 Posted June 28, 2006 I would like to name each Catagory but do not want to install Header Tags. I tried that and had nothing but troubles with it. Is there any other way?
Guest Posted June 28, 2006 Posted June 28, 2006 The default osc has an input field to enter the categories name on the osc admin. To simply display it you could edit the catalog\includes\languages\english\index.php find this code: define('HEADING_TITLE', 'Let\'s See What We Have Here'); replace it with this define('HEADING_TITLE', tep_get_category_name($current_category_id, $languages_id) ); You do not need to edit the "top" case as that is for the root page of the catalog. The header tags controller injects the meta-tags and that's good for SEO. I would stick with the contribution and if you have problems you could ask the support thread.
everyth5 Posted June 28, 2006 Author Posted June 28, 2006 Thanks Mark for the reply. Ok, now I have found what you said to look for and made the changes you mentioned. Now I am getting the following error. Fatal error: Call to undefined function tep_get_category_name() in /home/everyth5/public_html/includes/languages/english/index.php on line 23 something must be missing. The default osc has an input field to enter the categories name on the osc admin. To simply display it you could edit the catalog\includes\languages\english\index.php find this code: define('HEADING_TITLE', 'Let\'s See What We Have Here'); replace it with this define('HEADING_TITLE', tep_get_category_name($current_category_id, $languages_id) ); You do not need to edit the "top" case as that is for the root page of the catalog. The header tags controller injects the meta-tags and that's good for SEO. I would stick with the contribution and if you have problems you could ask the support thread.
Guest Posted June 28, 2006 Posted June 28, 2006 ah yes my fault forgot it. In the catalog\includes\functions\general.php just before the last closing ?> add this: function tep_get_category_name($category_id, $language_id) { $category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'"); $category = tep_db_fetch_array($category_query); return $category['categories_name']; }
everyth5 Posted June 28, 2006 Author Posted June 28, 2006 That did the trick Mark. Thanks a million. You are a genius ;) ah yes my fault forgot it. In the catalog\includes\functions\general.php just before the last closing ?> add this: function tep_get_category_name($category_id, $language_id) { $category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'"); $category = tep_db_fetch_array($category_query); return $category['categories_name']; }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.