Category on product detail page

Hallo,



When someone directly goes to a product detail page (like visitors from Google), I think it’s not very clear in witch category they are. So I would like to include the category name and image on the top of the detail page. Does someone know how to do that? I’m sure that a lot of people would like that on there website too.



Thank you.

Dear,



Use Blocks for the Product Page to display the Categories.



Thanks

Nobody? I tried code like:



{$product_data.category}
{$product.category}
{$category.parent_category}




Can someone help me out?

You need to follow these steps





Step 1:

open controllers/products.php and add the following code



$category_data=fn_get_category_data($product[‘category_id’]);

$view->assign(‘categories’,$category_data)



Step 2:

open skins/your_skin/customer/views/products/view.tpl



and then use {$categories.category} to display the Category of the Product.



Have a Nice day.



Regards

PeRoChAk

I’m guessing you don’t use SEO since the category related to the product would be in the URL like <yoursite.com>/my_category/my_product.html



How do you want to handle the case where a product can be in multiple categories?