How to get the category name in product/view.phtml from product_viewed.phtml?
问题 How can I get the category name from product_viewed.phtml list? I get an error when I land on the product page frontend\base\default\template\catalog/product/view.phtml if I click a product from frontend\base\default\template\reports/product_viewed.phtml This is the code on my view.phtml <?php $_helper = $this->helper('catalog/output'); $_category_detail = Mage::registry('current_category'); var_dump($_category_detail->getName()); //gives current category name ?> This is the error I get,