We'd like to use the category thumbnail and text as brand info to show the logo and description on the product page. How can I get these information on the product page?
I'm working in:
…/template/catalog/product/view.phtml
categorymagento-1
We'd like to use the category thumbnail and text as brand info to show the logo and description on the product page. How can I get these information on the product page?
I'm working in:
…/template/catalog/product/view.phtml
Best Answer
This approach didn't work for me because:
A product can be in several categories, so when you route to the product directly, it doesn't know the category. It's easy if you don't put products in more categories but more complex if you do.
I solved the problem with this answer: https://stackoverflow.com/questions/15735324/get-a-products-parent-category-even-if-it-is-accessed-directly
Here is my code to get the thumbnail image and description text even if a product is in more than one category (hope this helps others):