Magento – Check if product is in category then do something
<!– Chek if we are in categores –>
<?php $yourCatIds = array(10,9,8); $productCats = $_product->getAvailableInCategories(); if (count(array_intersect($yourCatIds,$productCats))) { ?>
<div class=”banner_info”><a href=”<?php Mage::getBaseUrl(); ?>/contatti”>Richiedi Preventivo</a></div>
<?php } ?>
<!– End Chek categories –>