jcadima
6/19/2017 - 3:30 PM

Check for CATEGORY VIEW page OR PRODUCT VIEW

Check for CATEGORY VIEW page OR PRODUCT VIEW


https://stackoverflow.com/questions/3503842/magento-how-to-tell-if-youre-on-a-category-page-or-product-page-in-phtml-fil


<?php
$fullActionName = Mage::app()->getFrontController()->getAction()->getFullActionName();
if ($fullActionName == 'catalog_category_view') { 
    echo "CATEGORY VIEW";
}
elseif ($fullActionName == 'catalog_product_view') {
     echo  "PRODUCT VIEW";
}
?>