Guest Posted February 26, 2005 Share Posted February 26, 2005 Hello! You know how when you drill down your list of categories, and you finally reach a "base" category containing a bunch of products/offerings? The title of that section is simply the word "Offerings". This word is defined in includes/languages/english/index.php In index.php, it is referred to as "HEADING_TITLE". My question is, how can i make "HEADING_TITLE" = the name of the category that the person has drilled down into? For example, on my site, one of my top level categories is "Live Plants - Natives", in the categories infobox on the left hand side. When someone drills into Live Plants - Natives, the page that index.php generates has a HEAD_TITLE of "Choose a category:". This is because there are sub-categories. Say someone chooses "Acacias" as their sub-category. This is one of my "base" categories containing product for sale. When they click "Acacias", the new HEADING_TITLE that index.php generates is simply the word "Offerings". I would like the heading title to be: "Live Plants - Natives --> Acacias: " or similar. Get it? Any ideas how to do this? Or any contributions that already have done this? Thanks ;) Rimbaud. Link to comment Share on other sites More sharing options...
Wendy James Posted February 26, 2005 Share Posted February 26, 2005 Hello! You know how when you drill down your list of categories, and you finally reach a "base" category containing a bunch of products/offerings? The title of that section is simply the word "Offerings". This word is defined in includes/languages/english/index.php In index.php, it is referred to as "HEADING_TITLE". My question is, how can i make "HEADING_TITLE" = the name of the category that the person has drilled down into? For example, on my site, one of my top level categories is "Live Plants - Natives", in the categories infobox on the left hand side. When someone drills into Live Plants - Natives, the page that index.php generates has a HEAD_TITLE of "Choose a category:". This is because there are sub-categories. Say someone chooses "Acacias" as their sub-category. This is one of my "base" categories containing product for sale. When they click "Acacias", the new HEADING_TITLE that index.php generates is simply the word "Offerings". I would like the heading title to be: "Live Plants - Natives --> Acacias: " or similar. Get it? Any ideas how to do this? Or any contributions that already have done this? Thanks ;) Rimbaud. <{POST_SNAPBACK}> Not sure if this is the prettiest way to do this because I have a whole bunch of contibutions added to my site but I changed <?php echo HEADING_TITLE; ?> to <?php if (tep_not_null($category['categories_heading_title']) ) { echo $category['categories_heading_title']; } else { echo HEADING_TITLE; } ?> in catalalog/index.php. I think it is about line 66 and again on 240 on a clean instal but I could be wrong. The code is there 3 times. I just changed the first 2. Hope that helps. Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep. Link to comment Share on other sites More sharing options...
Guest Posted February 26, 2005 Share Posted February 26, 2005 hi Wendy, thanks so much for this. I am sure this is exactly what i am looking for. I replaced the occurences (3 of them, like you say) with the altered PHP code you wrote. I didnt get an error when i went to my site, but it didn't replace "Offerings" either. I thought, oh, maybe it's $categories not $category. I changed that value but still the same thing. I can only assume that for some reason, (tep_not_null($category['categories_heading_title']) ) is in fact null, on my store. I have only installed a few mods here and there, and certainly nothing to mess with category structures, table structures etc. Is this code straight out of your own page? I was just wondering, maybe there's some little thing that prevents this from working? thanks ;) Link to comment Share on other sites More sharing options...
Guest Posted February 26, 2005 Share Posted February 26, 2005 actually i just found a contrib that does this. http://www.oscommerce.com/community/contri...arch,categories i imlpemented it per the insrtuctions and it works fine ;) Hope this helps someone Link to comment Share on other sites More sharing options...
Wendy James Posted February 26, 2005 Share Posted February 26, 2005 actually i just found a contrib that does this. http://www.oscommerce.com/community/contri...arch,categories i imlpemented it per the insrtuctions and it works fine ;) Hope this helps someone <{POST_SNAPBACK}> Sorry about that, was pretty sure it would work. Like I said I have a bunch of contributions added to my site and they must be effecting the code in some way. I am in no way a pro. Sorry you wasted your time. I should have just suggested one of the contributions I used. Glad you got it working. Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.