0
votes

I get this error when searching for a product in my store:

Fatal error: Call to a member function getIsAnchor() on a non-object in /var/www/vhosts/pipetto.co.uk/httpdocs/app/design/frontend/default/pipetto/template/catalog/product/list.phtml on line 41

http://www.pipetto.co.uk/catalogsearch/result/?q=iphone

I think list.phtml is not pointing to the right block. Any ideas?

1

1 Answers

1
votes

So i think you have done some changes to your template file. And some of these require the user being on a category listing page.

getIsAchor() must be called from an objet, and a category object in particular...

But of course the list.phtml template is also used on search result pages and here you don't have acces to any category object (by Mage::registry('current_category') i presume).

So just place a condition lile this:

if(!is_null(Mage::registry('current_category')))

for a quick fix but i think it's more a conception problem.

Sincerely,

Jonathan