cancel
Showing results for 
Search instead for 
Did you mean: 

1.9.2.4 - new products list

1.9.2.4 - new products list

Hi,

I have made a fresh install of 1.9.2.4.

I have also a CMS page "New products". In the content of this page I have put :

 

{{block type="catalog/product_new" column_count="6" products_count="0" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/list.phtml"}}

This works in 1.9.1.0 but not in 1.9.2.4.

 

This is the error: 

 

Fatal error: Call to a member function count() on a non-object in var/www/vhosts/ ....../app/design/frontend/default/XXXX/template/catalog/product/list.phtml on line 38

 

 

<?php
/**
 * Product list template
 *
 * @see Mage_Catalog_Block_Product_List
 */
?>
<?php
    $_productCollection=$this->getLoadedProductCollection();
    $_helper = $this->helper('catalog/output');
?>
<?php if(!$_productCollection->count()): ?>
<p class="note-msg"><?php echo $this->__('There are no products matching the selection.') ?></p>
<?php else: ?>
<article class="category-products">
    <?php echo $this->getToolbarHtml() ?>

 

 

thx,

gp

1 REPLY 1

Re: 1.9.2.4 - new products list

Replace products_count="0" with products_count="X", here X means number of products you want to get from collection.

Let me know if it works or not.