A client asked to create a Magento shop with Art Gallery like functionality. What she want is to have a product list in the homepage having pagination. Let's get it on!
- In the backend:
Manage Categories > set the default category to anchor:yes, then assign all products in this category - CMS->homepage > put this snippet in the layout update xml
<!-- ########################## DISPLAY ALL PRODUCTS IN HOMEPAGE ############################ --> <reference name="content"> <block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"/> <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml"> <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="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action> <action method="setToolbarBlockName"><name>product_list_toolbar</name></action> </block> <update handle="page_two_columns_right" /> </reference>
Very nice piece of work worked well for me with magento.
ReplyDeletehttp://www.boilersonline.com
Hi davendi
ReplyDeleteglad it worked on your site. :)
I must say this is exactly what I was looking for.
ReplyDeletePreviously I was listing all programs within my category but via the catalog/product model, adding pagination to that proved difficult.
Thanks.
Thanks dear...
ReplyDeletethis works great for me
thank u very much
This comment has been removed by the author.
ReplyDeleteIt is extremely nice to see the greatest details presented in an easy and understanding manner. german blog
ReplyDelete