Magento product category missing in breadcrumb -
on home page of magento site, used following code add latest products block
{{block type="catalog/product_list" category_id="2" template="catalog/product/random.phtml"}}
when clicking on latest products, work (the ones worked showed full breadcrumb) , others lead error: fatal error: call member function getname() on non-object in /var/www/vhosts/riderseyewear.net/httpdocs/app/design/frontend/fortium/default/template/page/1column-product.phtml on line 80
the error described more here http://i.imgur.com/rrg3ixu.png
in 1column-product.phtml file, went line 80 , changed
$currentcat = mage::registry('current_category')->getname();
to
$currentcat = mage::registry('current_product')->getname();
changing line removed error. however, category name not show in breadcrumbs when clicking on product. breadcrumb shows home/product_name instead of home/category_name/product_name
how can full breadcrumb show while not receiving fatal error?
follow link http://dltr.org/blog/magento/381/magento-force-display-full-breadcrumb-path. works me. let me know if more.
Comments
Post a Comment