Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

Get Current Category Name on Product Details Page Magento

IF you want to display current category name on Product details page, you can easily do it. Just added following few lines of code in your view.phtml file.

<?php $_helper = $this->helper('catalog/output');?>
<?php $_category_detail = Mage::registry('current_category');?>
<?php echo $_category_detail->getName();?>
<?php echo $_category_detail->getId(); ?>



Please support us, Like us on Facebook.

0 comments:

Post a Comment

 

Copyright @ 2017 HKBlog.