caciobanu / improved-magento-layered-navigation

This project has reached its end-of-life (EOL).
MIT License
138 stars 54 forks source link

Fatal Error #110

Closed MichaelAndish closed 7 years ago

MichaelAndish commented 7 years ago

Hi , We have this Error :

Fatal error: Uncaught Error: Call to a member function getSortedChildren() on boolean in /Applications/XAMPP/xamppfiles/htdocs/eshop/app/design/frontend/base/default/template/catalin_seo/catalog/product/list.phtml:115 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/eshop/app/code/core/Mage/Core/Block/Template.php(241): include() #1 /Applications/XAMPP/xamppfiles/htdocs/eshop/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/base/d...') #2 /Applications/XAMPP/xamppfiles/htdocs/eshop/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView() #3 /Applications/XAMPP/xamppfiles/htdocs/eshop/app/code/core/Mage/Core/Block/Abstract.php(923): Mage_Core_Block_Template->_toHtml() #4 /Applications/XAMPP/xamppfiles/htdocs/eshop/app/code/core/Mage/Core/Block/Abstract.php(641): Mage_Core_Block_Abstract->toHtml() #5 /Applications/XAMPP/xamppfiles/htdocs/eshop/app/code/core/Mage/Core/Block/Abstract.php(585): Mage_Core_Block_Abstract->_getChildHtml('product_lis in /Applications/XAMPP/xamppfiles/htdocs/eshop/app/design/frontend/base/default/template/catalin_seo/catalog/product/list.phtml on line 115

caciobanu commented 7 years ago

This is usually an error that appears on custom themes. You can go to file app/design/frontend/base/default/template/catalin_seo/catalog/product/list.phtml line number 115 and changed it to:

$_nameAfterChildren = $this->getChild('name.after');
wesleyalmd commented 7 years ago

Change line 64 on list.phtml for this:

<?php
//set product collection on after blocks
if ($this->getChild('name.after')) : 
    $_nameAfterChildren = $this->getChild('name.after')->getSortedChildren();
    foreach($_nameAfterChildren as $_nameAfterChildName):
        $_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName);
        $_nameAfterChild->setProduct($_product);
        ?>
        <?php echo $_nameAfterChild->toHtml(); ?>
    <?php endforeach; ?> 
 <?php endif;?>