0

I added a function to catalog/products/list.phtml to change styling for certain category. It works fine on category list but it doesn't on search page.

Error

Fatal error: Call to a member function getId() on a non-object in ../catalog/product/list.phtml

Added function in product image section

if(Mage::registry('current_category')->getId() == 94))

How can I use this function but make searching working, please?

sidlo
  • 183
  • 1
  • 10

1 Answers1

0

I think it's because, search page doesn't belong to any category or I think it's under root category.. Did you checked that search page category id?? Try to check this. I think after checking this you can find your answer..