I want to show all attributes of a product in compare page. I added this code in catalog/product/compare/list.phtml
but I get this error:
<h2><?php echo (
(
$_item->getProduct()->getResource()->getAttribute('admin_rating')->getFrontend()->getValue($_item->getProduct() )
&& $_item->getProduct() ->getResource()->getAttribute('admin_rating')->getFrontend()->getValue($_item->getProduct() ) != "Nein"
)
? $_item->getProduct() ->getResource()->getAttribute('admin_rating')->getFrontend()->getValue($_item->getProduct() )
: ''
); ?></h2>
ERROR: Fatal error: Call to a member function getResource() on a non-object in ...\app\design\frontend\base\default\template\catalog\product\compare\list.phtml on line 78
What's wrong?