Change Number of New Products on Home Page :: Magento

By default, the new products method of adding products to home page will result in 5 products being displayed. To change this, you need to modify 2 core files.

 

This example shows how to add 10 items. 2 rows of 5 products each.

 

 

 

You need to change the line in \app\code\core\Mage\Catalog\Block\Product\New.php

$products->setOrder('news_from_date')->setPageSize(5)->setCurPage(1);
change to
$products->setOrder('news_from_date')->setPageSize(10)->setCurPage(1);

 

NOTE: As noted in Magento Version 1.3.1 there is a change in code in this file for good.

Now we just need to make one easy change in the beginning of the file.

 

Set const DEFAULT_PRODUCTS_COUNT = 10;

 

And need to change new.phtml


<?php if ($i>5): continue; endif; ?>
change to
<?php if ($i==5): echo "</tr><tr>"; endif; ?>
<?php if ($i>9): continue; endif; ?>

 

 

http://www.magentocommerce.com/boards/viewthread/16287/