Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Top Category Name


bobosc123

Recommended Posts

Posted

Hello,

 

I have been having a difficult time trying to figure out how to simply echo the name of the Top Category even when viewing on a sub-category page.

For example, when viewing Mice, in the Hardware category of a new osCommerce installation, I would like to keep the Top Category name "Hardware" in the page heading instead of Mice or anything else.

 

So, how would I write the following to get just the Top Category name?

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

I have tried <td class="pageHeading"><?php echo $category['categories_name']; ?></td> and the Top Category name displays only when on the Top Category but disappears once you click on a subcategory.

 

Thank you for any help you can provide. :blink: I'm stumped! :'(

 

-Bob

Posted

why use sub categories if you dont want to display them properly?

Posted
why use sub categories if you dont want to display them properly?

Thanks for responding. :thumbsup:

 

Actually, I have a Top Categories only horizontal menu in the header and because of the graphic layout of the shop, I have to place a subcategories only menu in the left column. This looks great with the subcategories indenting when a third level category is viewed.

 

Now, I would like to simply add the name of the Top Category to display throughout the subcategory pages. I think a simple direct link that looked up the cpath or category ID (category name) would do the trick.

 

I realize it sounds strange but with the layout, it makes a lot of sense. Plus, I know I could make use of displaying just the Top Category name in some of my other shops so I'm hoping someone can send me in the right direction.

 

Bob.

Posted

:thumbsup: I really do appreciate Mibble taking the time to respond....Is there anyone else that can help?

 

I simply need the PHP code to pull in the Top Category even when on a subcategory page or product page.

 

Thanks,

Bob

  • 6 months later...
Posted
Thanks for responding. :thumbsup:

 

Actually, I have a Top Categories only horizontal menu in the header and because of the graphic layout of the shop, I have to place a subcategories only menu in the left column. This looks great with the subcategories indenting when a third level category is viewed.

 

This sounds like something i'm searching for.

If i understand it correctly you placed the Top Categories in the "headerNavigation" row instead of the breadcrumb and the sub categories open in the info box on the left side? So if you click on one of the Top Categories links only the associated sub menu opens and not also the ones from the other Top Categories? This is what i'm searching for for a new shop i'd like to set up. Is it an contribution or did you build it yourself? Can i see it anywhere?

  • 1 month later...
Posted
This sounds like something i'm searching for.

If i understand it correctly you placed the Top Categories in the "headerNavigation" row instead of the breadcrumb and the sub categories open in the info box on the left side? So if you click on one of the Top Categories links only the associated sub menu opens and not also the ones from the other Top Categories? This is what i'm searching for for a new shop i'd like to set up. Is it an contribution or did you build it yourself? Can i see it anywhere?

 

I built this exact menu system for a client (does not want his domain published in this forum so I can't provide a link).

 

  1. Horizontal Top Category menu
  2. Subcategory menu in the left column only that reflects the top category being viewed at the time.
  3. Top Category image is displayed on top of the left Subcategory menu

PM me if you want the details.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...