Sunday 6 January 2013

Magento- Display Products on Home Page with Pagination



If you want to display products on home page of your Magento Store with pagination, then this tutorial is for you. Follow these simple steps to add such functionality in your Magento Store:
  • Go to CMS > Manage Pages and click on the “Home page”.
  • Under the “Design” tab, insert the following code in the “Update Layout XML” field:


<reference name="content">
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>3</category_id></action> 
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action> 
</block> 
</reference>

No comments:

Post a Comment