Hi there,
I have a list of categories and then you click through to see all the products in that category. Then you click on a product!
How can I show the category name that product is in on the product page?
Thank you
Open file : catalog/controller/product/product.php
find code (may be in line 28) :
add after :
open product template file :
and the code any where you wanna show category name :
find code (may be in line 28) :
Code: Select all
$category_info = $this->model_catalog_category->getCategory($path_id);
Code: Select all
$this->data['category_name'] = $category_info['name'];
Code: Select all
catalog/view/theme/default/template/product/product.tpl
Code: Select all
<?php if(isset($category_name)) { ?>
<?php echo $category_name; ?>
<?php } ?>
News CMS || Plus SEO || Live Price change with Option Select
Who is online
Users browsing this forum: No registered users and 88 guests