3

I researched and found this but it doesnt work for me.

How can I list all products in one page?

8

I have found another way of implementing this, which has some distinct advantages over the {{block}}-in-a-CMS-page method.

  1. Shows the native toolbar, for sorting/pagination
  2. Makes your "All" products "page" show up in the category navigation menu (you can change this with "Show In Navigation" dropdown.)
  3. Allows you to set the default sorting preferences, to show newest products first, or whatever sorting you desire.

I create a new category, and use the XML Layout Updates to set the template block's category_id to the root category ID of the store. This makes it so that when I am viewing this "dummy" category, it shows every product in the default category (ie, every product in the store).

Here's the XML (paste this in the category's "Custom Layout Update" under the "Custom Design" tab.)

<!-- This is a "dummy" category. When it's shown, we force its' category ID to be 2, causing it to show "All" products -->
<!-- This ONLY works because categoryId:2 is the "Root Category". -->
<reference name="product_list">
    <action method="setData">
        <key>category_id</key>
        <value>2</value>
    </action>

    <!-- Set the available sort methods, defaulting to Newest. -->
    <action method="setAvailableOrders" json="value">
        <value><![CDATA[{"created_at" : "Newest","price":"Price"}]]></value>
    </action>
</reference>

<!-- Default to DESCENDING order, to show newest products first -->
<reference name="product_list_toolbar">
    <action method="setDefaultDirection">
        <dir>desc</dir>
    </action>
</reference>
2

Try this

 {{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}} 
  • It's given "THERE ARE NO PRODUCTS MATCHING THE SELECTION." But already there are products – Ibrahim Mumcu Feb 21 '14 at 9:42
  • then try to add the category id in the code like category_id="your Category id" and see what is happening there – Waseem Feb 21 '14 at 9:44
  • When I write sub category id it's working but root category id given the same message. Why is diffent? How can I list all category's products?. – Ibrahim Mumcu Feb 21 '14 at 9:54
  • 1
    Go to Manage Category and make root Category to Is Anchor to “YES”. It's worked! Thank you so much! – Ibrahim Mumcu Feb 21 '14 at 10:02
  • I am happy to help. – Waseem Feb 21 '14 at 10:03
2

May I suggest my free open-source extension which does it - https://github.com/tim-bezhashvyly/CustomListing

Unfortunately Tim has deleted his repo, try this fork: https://github.com/ho-nl/CustomListing

  • Your link is dead, it shows an 404 Error :( – Julian Apr 20 '15 at 7:09
  • 1
    updated the link – Fabian Blechschmidt Jun 7 '15 at 19:44
0

I succeeded to display all products on my Magento home page using the following reference: https://magentoexplorer.com/how-to-add-and-display-all-products-on-homepage-in-magento

enter image description here To display all products on Magento homepage

In Magento backend, go to CMS -> Manage pages > Homepage and add this code

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}

To Display products from a specific category to homepage

Go to CMS -> Pages > Homepage and add the follow code to HTML editor of Homepage

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="3" template="catalog/product/list.phtml"}}

Replace category_id="3" with your desired category ID

Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.