main_category name from product

Hi all,

I’m wondering if anybody knows how to print the parent category name of a product??

I’m trying to do this from the product details page…

I can get to the parent category ID ($product.main_category.category_id) but can’t figure out how to print the name. Anybody have any ideas and/or want to give me a quick snippet of code :slight_smile:

Brian: can you explain to me the code to get the category or subcategory name to appear on the product detail page? I used the code above and got a number.

I would like to have all the products in that category or subcategory appear under the category heading (from the code above) – just a hyperlink text list. Any ideas? Yes, all of this appears on the product detail page.