I have this code in my view.phtml file which displays a list of all the products categories:
<?php
$catIds = $_product->getCategoryIds();
foreach($catIds as $catId) {
$category = Mage::getModel('catalog/category')->load($catId);
echo $category->getName();
}
?>
Instead of displaying the category list in view.phtml I would like to display it in tabs.phtml. Tabs.phtml displays additional product information at the bottom of the product page.
I tried doing a direct copy and paste but this didn't work. Does anyone know how I can get this code to work in tabs.phtml?