0

I am using Magento 1.9.3

There are 8000 products in my website and I want to display all of them in one cms page.

I have added below code in my cms page:

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

But it didn't work. it displays only 9 products.

So what can I do to display all products in one cms page?

2
  • Go to Manage Category and make root Category to Is Anchor to “YES” Commented Nov 13, 2018 at 8:47
  • @Rohan Hapani I think it's not gonna work because I have created a separate cms page "All Products" and in this page I want to display all product. Commented Nov 13, 2018 at 9:06

1 Answer 1

0

Create new category. Set this category include menu No. Call phtml file from CMS page

{{block type="catalog/product" template="catalog/product/view/custom.phtml"}}

Now from that phtml load that category product.

$categoryId = 10; // Your newly created category id
$category = Mage::getModel('catalog/category')->load($categoryId);

/**
 * Getting product collection for a particular category 
 */
$prodCollection = Mage::getResourceModel('catalog/product_collection')
            ->addCategoryFilter($category)
            ->addAttributeToSelect('*');


/** 
 * Printing category and products name
 */ 
echo '<strong>'.$category->getName().'</strong><br />';
foreach ($prodCollection as $val) {
    echo $val->getName() . '<br />';
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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