Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. Fatal error: Call to a member function getId() on a non-object in
  2. The line that is giving error is the last line in the below code:
  3.  
  4. <?php
  5. $_productCollection=$this->getLoadedProductCollection();
  6. $_productCollection->addAttributeToSelect('news_from_date')
  7. ->addAttributeToSelect('news_to_date');
  8. $_helper = $this->helper('catalog/output');
  9. $store = Mage::app()->getStore();
  10. $code = $store->getCode();
  11. ?>
  12. <?php $_helper = $this->helper('catalog/output');?>
  13. <?php $_category_detail=Mage::registry('current_category');?>
  14. <?php
  15. $products_count = Mage::getModel('catalog/category')->load($_category_detail->getId())->getProductCount();
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement