tommy916 Posted February 24, 2004 Posted February 24, 2004 does anyone know how can i replace "Let's See what we have here" when you click on subcategories. I want to replace with whatever the name of subcategories is. HEADING_TITLE in index.php
tommy916 Posted February 26, 2004 Author Posted February 26, 2004 does anyone know this has a contribution or not? I want to replace with subcategories name.
Guest Posted February 26, 2004 Posted February 26, 2004 I just gave it a try myself. here's the problem: if you're displaying a sub-category (like Software--> Action), displaying action will require a lot of re-writing. This is because all the info on that level (like the category image), are from a table maned "categories", which does not hold the category names. these are held in "categories_description", and the names are language dependant. So if you, or anyone else feel like messing with some SQL, that's what has to be done. THe fix will ahve to go in index.php, right before line #249. you would then replace <?php echo HEADING_TITLE; ?></td> (line 253) with a call to whaever you named the category name variable. If you do in fact ge tthis done, turn it into a contribution, and let me know! Me wants! All that was the bad news. Now for the good news: if you're in a top-level category, all you need to do in order to display the category name, is go to line #66, and erplace <?php echo HEADING_TITLE; ?></td> with <?php echo $category['categories_name']; ?></td> That's it! Let me know how it goes, -Ethan
tommy916 Posted February 26, 2004 Author Posted February 26, 2004 I just figured this out myself. In the index.php, there are three of this. <?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 $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;} ?> I am going to add into contribution, I don't know what it called. hmm i'll say "Page Heading Title"
tommy916 Posted February 26, 2004 Author Posted February 26, 2004 forgot to mention, the third <?php echo HEADING_TITLE; ?> there is no modify needed. I don't know how to do the manufacturers page list. if anyone can add it, that would be great
Guest Posted February 27, 2004 Posted February 27, 2004 Damn, dude, you rock! At first I thought you were greener at this then I am, and seeing how I wasn't going to take the time and effort in coding that SQL, my oppinion changed drastically. I just put what you wrote on my site, and it works perfectly! Thanks -Ethan
TheBlueEyz Posted February 27, 2004 Posted February 27, 2004 Do you have any idea how to do this when using the Basic Template System? I've tried this and the BTS makes changes so that using the $category array no longer works.. and the variables are being loaded from so many different places that I really just can't tell where the names are coming from anymore. Yes, I could replace the HEADING_TITLE definition in filenames.php, but then it changes the title on all pages to ONE thing, instead of it being the actual category being loaded. I tried to find the right variable for a couple of hours with no luck. Has anyone tried to do this using BTS?
The Anchor Store Posted March 2, 2004 Posted March 2, 2004 I tried to do this but it did not work for me. I have the STS contribution installed and it may be causing the trouble. Any ideas? Roy The Anchor Store
Guest Posted March 3, 2004 Posted March 3, 2004 I had to use $categories['categories_name'] instead. Not sure why but I've stopped looking. As long as it works ;) cb --
ghiggi Posted March 3, 2004 Posted March 3, 2004 Just tried this out and it works fine on my site, except, I get a drop down box for sorting by manufacturers along with the name of the subcategory. Any Idea how I can get rid of the drop down box? thanks, ghiggi
berkedam Posted March 3, 2004 Posted March 3, 2004 does anyone know how can i replace "Let's See what we have here" when you click on subcategories. I want to replace with whatever the name of subcategories is. HEADING_TITLE in index.php 1. BACK UP YOUR CURRENT FILE(S) before modifying! 2. Open: /catalog/includes/languages/(lang_here)/index.php (or default.php depending on version) 3. Find: define('HEADING_TITLE', 'Let\'s See What We Have Here'); 4. Change line to: define('HEADING_TITLE', ucwords(strtolower($categories['categories_name']))); 5. Find: define('HEADING_TITLE', 'What\'s New Here?'); 6. Change line to: define('HEADING_TITLE', 'Welcome at MYCOMPANY'); 7. Find: define('HEADING_TITLE', 'Categories'); 8. Change line to: define('HEADING_TITLE', ucwords(strtolower($categories['categories_name']))); 9. Save and close index.php "If you're working on something new, then you are necessarily an amateur."
Guest Posted March 3, 2004 Posted March 3, 2004 Just tried it myself and it worked for page names etc, BUT completely ruined the page layout column left and right. Any ideas??????? Steve
berkedam Posted March 4, 2004 Posted March 4, 2004 Just tried it myself and it worked for page names etc, BUT completely ruined the page layout column left and right. Any ideas??????? Steve Buit-in templates maybe or a contribution? "If you're working on something new, then you are necessarily an amateur."
osCshop Posted June 14, 2005 Posted June 14, 2005 I'm using Tommy's great contribution (with STS) and it works great! How to tweak this hack to show not just the last but the last 2 subcategories?!? My categories contain subcategories with models. A model is split in years. I would like to see the Model and Year as Page Heading... TIA
osCshop Posted July 9, 2005 Posted July 9, 2005 I'm using Tommy's great contribution (with STS) and it works great!How to tweak this hack to show not just the last but the last 2 subcategories?!? My categories contain subcategories with models. A model is split in years. I would like to see the Model and Year as Page Heading... TIA <{POST_SNAPBACK}> Anybody Plz :huh:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.