Guest Posted January 25, 2007 Share Posted January 25, 2007 Hi, I've been looking for help to be able to have the category header to change dynamically when my customers click on a certain category, instead of the store just putting the "Category" header. Ive been looking at the forum and im getting confused, there are metatags, header tags, etc..topics.. can anyone give me a link to a discussion on the solution I would like to get? Thanks in advance. Link to comment Share on other sites More sharing options...
bkellum Posted January 25, 2007 Share Posted January 25, 2007 Hi, I've been looking for help to be able to have the category header to change dynamically when my customers click on a certain category, instead of the store just putting the "Category" header. Ive been looking at the forum and im getting confused, there are metatags, header tags, etc..topics.. can anyone give me a link to a discussion on the solution I would like to get? Thanks in advance. Eric, I'm not sure if this is what you are looking for but here goes... To get rid of "Let's See What We Have Here" for your Categories and Sub-Categories, you can replace them with the name of the categories or subcategories name so that these titles will be dynamically inserted. Here is how I hacked the OsCommerce code to do it: Open the following file in a text editor: /yourstore/index.php Do a search for the following line of code: <?php echo HEADING_TITLE; ?> You will find three instances of each. Do the following: To see the name of your CATAGORIES instead of "let's see what we have here" text, just replace the first instance of the code: <?php echo HEADING_TITLE; ?> With the following: <?php echo $category['categories_name'] ?> To also have SUBCATEGORIES displayed dynamically as the CATAGORIES above, just replace the second instance of the code: <?php echo HEADING_TITLE; ?> With the following: <?php $category_query1 = 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 . "'"); $category1 = tep_db_fetch_array($category_query1); if ($category1['categories_name'] != "") {echo $category1['categories_name'];} else { echo HEADING_TITLE;} ?> The third <?php echo HEADING_TITLE; ?> should be left alone so you do not need to modify it at all. Don't forget to save your document as the same name as the original index.php. That's all there is to it. :thumbsup: Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
Guest Posted January 25, 2007 Share Posted January 25, 2007 You are the MAN!!!! Thank you so much for the help! I have spent like 9 hours trying to figure this thing out..... thank you again for your help.. Eric, I'm not sure if this is what you are looking for but here goes... To get rid of "Let's See What We Have Here" for your Categories and Sub-Categories, you can replace them with the name of the categories or subcategories name so that these titles will be dynamically inserted. Here is how I hacked the OsCommerce code to do it: Open the following file in a text editor: /yourstore/index.php Do a search for the following line of code: <?php echo HEADING_TITLE; ?> You will find three instances of each. Do the following: To see the name of your CATAGORIES instead of "let's see what we have here" text, just replace the first instance of the code: <?php echo HEADING_TITLE; ?> With the following: <?php echo $category['categories_name'] ?> To also have SUBCATEGORIES displayed dynamically as the CATAGORIES above, just replace the second instance of the code: <?php echo HEADING_TITLE; ?> With the following: <?php $category_query1 = 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 . "'"); $category1 = tep_db_fetch_array($category_query1); if ($category1['categories_name'] != "") {echo $category1['categories_name'];} else { echo HEADING_TITLE;} ?> The third <?php echo HEADING_TITLE; ?> should be left alone so you do not need to modify it at all. Don't forget to save your document as the same name as the original index.php. That's all there is to it. :thumbsup: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.