I have tried to use the code I use in catalog/product/view.phtml file and where it works
$yourCatIds = array(6,12); //telkide või peoinventari rent
$productCats = $_product->getAvailableInCategories();
if (count(array_intersect($yourCatIds,$productCats))) {
echo "text";
}
but that gives me this error:
Fatal error: Call to a member function getAvailableInCategories() on a non-object in /home/profitel/public_html/app/design/frontend/default/hellowired/template/page/2columns-right.phtml on line 25
I tried also
$parentCategory = Mage::getModel('catalog/category')->load($parentCategoryId);
but also didn't work.
getAvailableInCategories
method - Retrieve category ids where product is available – sergio