0
votes

I want to display more than 5 (exact 10) new product on Static CMS home page on a Magento CE 1.9.1.1 installation with Magento default sample data . I already marked more than 10 product as new items.

To get it, I made a child theme for Magento RWD theme and in its local.xml file, I put the below code snippet.

 <layout version="0.1.0">

        <cms_index_index translate="label">
            <reference name="content">
                <block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new_list.phtml" after="cms_page">
                <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
                <action method="setColumnCount"><columns>2</columns></action>
                <action method="setProductsCount"><count>10</count></action>
                </block>
            </reference>
        </cms_index_index>

    </layout>

But Magento only display 5 new products on home page. If I reduce the product count less than 5 (<action method="setProductsCount"><count>3</count></action>), the above code works and Magento output 3 products as New Items.

But for more than 5 items, setProductsCount fails.

I searched different pages & none of the solutions works for me. There is a same question here for Magento 1.7.

how do I show more than 5 featured products on homepage in magento 1.7?

How Magento limit this count? In the above page, I realize that we are going to load the block class, Mage_Catalog_Block_Product_New from app/code/core/Mage/Catalog/Block/Product/New.php file. In that file, there is default count variable declaration.

 const DEFAULT_PRODUCTS_COUNT = 10;

Can you suggest a solution?

1

1 Answers

0
votes

We know that this block selected products which are set Set Product as New from Date. Magento Admin > Catalog > Manage Products > choose your products you want to show > Product as New from Date. You try to clear all Magento Cache and Re-index your database.

We also see a widget new products block in content of Homepage CMS. We can use this Widget:

{{widget type="catalog/product_widget_new" display_type="new_products" products_count="5" template="catalog/product/widget/new/content/new_grid.phtml"}}

If you want to change products per row, you will change product_count value.

Actually, your issue is weird, the same issue is resolved here: Magento limit the number of products shown with in the new products block

You should test with a fresh new Magento. And, then try to figure out what reason causes this issue, can be custom code lines or an extension.

Update: may caused by Css style.