0
Magento 1.9.3.7
Porto theme

I did a fresh install of Magento 1.9.3.7. I installed the Porto theme. The setup is identical to the one I have in Magento 1.9.1 but when I put the following code into the CMS home page - it does not show any products:

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

(I have included the correct category ID which is a subcategory of the root category. It does not work with the category ID of the root category either)

I've tried this code as well as all the codes in this post and none works:

https://stackoverflow.com/questions/4253389/magento-how-to-display-all-products-in-the-homepage

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

The code I have in my Magento 1.9.1 website is this (it does not work in my Magento 1.9.3.7 store either):

<p>{{block type="catalog/product_list" category_id="26" template="catalog/product/list.phtml"}}</p>

I noticed that on the page referenced - someone wrote: "I also had to allow the block on System/Permissions/Blocks" --) Would that have something to do with this and how do I find out the Block name and path to set the permission to?

What does work is displaying Featured products via this:

<style type="text/css">.main-container, .col-main{padding-top:0;padding-bottom:0}</style>
{{block type="filterproducts/featured_home_list" product_count="8" column_count="4" template="filterproducts/flex_grid.phtml"}}

We can't have that though as we really need to display products from a category so that we can sort them in a specific order.

1

I found a solution - as stated here:

https://magentoexplorer.com/how-to-add-and-display-all-products-on-homepage-in-magento

From Magento 1.9, we need to set permission for catalog/product_list block to enable this block to be shown on Magento homepage.

Go to

System->Permissions->Blocks

add permission for catalog/product_list block as follows:

Block name = catalog/product_list
Is Allowed = YES

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.