Showing posts with label Products.Categroy. Show all posts
Showing posts with label Products.Categroy. Show all posts

Friday, January 13, 2012

Magento Add product on home page

There are numerous ways to put products on your home page
New products on home page
{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}
New products on home page through xml

<reference name="content">
    <block type="catalog/product_new" template="catalog/product/new.phtml">
        <action method="setProductsCount"><count>5</count></action>
        <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
        <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
        <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
        <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
        <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
    </block>
</reference>

All products on home page
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}
All products from one categroy
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="4" template="catalog/product/list.phtml"}}

LinkWithin

Blog has moved, searching new blog...