Magento – Get all Categories of the Product
This method returns all category ids of the product as array. Remember it only returns an array of product categories and not the category details.
<?php $_Product = Mage::getModel("catalog/product")->load( PRODUCT_ID ); $_CategoryIds = $_Product->getCategoryIds();//array of product categories ?>