tropiland Posted October 15, 2007 Share Posted October 15, 2007 Hello everyone, I have a store named e-SmartLiving (http://e-smartliving.com/catalog) and I want to change the page title of the catalog from "e-smartliving products" to reflect the name of the category/subcategory when my visitors are in these categories/subcategories of the catalog. The Knowledge data base has an article on this but it only works for categories that have subcategories in them. How to I proceed? Thank you in advance for your help. Cheers, DS Link to comment Share on other sites More sharing options...
allaboutwicker Posted October 15, 2007 Share Posted October 15, 2007 Hi, I believe this little contrib is what you are looking for. As it was just a text file, I figured I would just copy it here for you to read. Only one file to modify! My webhost went totally down and took my website with it (they said they would back up, but noooo !. Unfortunately, I did not have a complete back up of it since my FTP program wasn't able to access my data and now I am in the process of rebuilding it from scratch. Oh Well, I have a lot of the info around in my files, but lost all of my customer info database. You may gladly checkout my site, allaboutwicker.com, so far (still not fully done) and see if there are any other changes to the oscommerce software that I have done and let me know if you need the contrib for it. Best Wishes! Page Heading Title Better ------------------------- ***************************** This is a modification of Tommy Le's work so that manufacturer's names will show instead of "Let's See What We Have Here" when listing products by manufacturer. I also removed the unnecessary c.categories_image select from the SQL query. ***************************** 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. Link to comment Share on other sites More sharing options...
tropiland Posted October 15, 2007 Author Share Posted October 15, 2007 Hi, I believe this little contrib is what you are looking for. As it was just a text file, I figured I would just copy it here for you to read. Only one file to modify! My webhost went totally down and took my website with it (they said they would back up, but noooo !. Unfortunately, I did not have a complete back up of it since my FTP program wasn't able to access my data and now I am in the process of rebuilding it from scratch. Oh Well, I have a lot of the info around in my files, but lost all of my customer info database. You may gladly checkout my site, allaboutwicker.com, so far (still not fully done) and see if there are any other changes to the oscommerce software that I have done and let me know if you need the contrib for it. Best Wishes! Page Heading Title Better ------------------------- ***************************** This is a modification of Tommy Le's work so that manufacturer's names will show instead of "Let's See What We Have Here" when listing products by manufacturer. I also removed the unnecessary c.categories_image select from the SQL query. ***************************** 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. Thank you! Much appreciated Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.