skip to Main Content

I’ve got a static block in which I’m getting the products from a specific category so like this:

{{block type="catalog/product_list" name="product_list" category_id="429" column_count="4"  mode="grid" limit="50"  template="catalog/product/list.phtml"}}

Now I’m trying to call this static block in my phtml file like this:

 <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('products')->toHtml();
    ?>

But it doesn’t show the products on the page.
I’ve tried adding the code of the static block to a cms page and then the products are showing, just not for the page with the phtml file.
I’ve also tried just adding some text to the static block instead of {{block type="catalog/product_list" name="product_list" category_id="429" column_count="4" mode="grid" limit="50" template="catalog/product/list.phtml"}} to test if it works then and it does display the text. So I think it’s got something to do with calling a block within the static block but is there any other way to do it?

Am I missing something here?

2

Answers


  1. Have you add “catalog/product_list” block type in System -> Permissions -> Block? If not then you must add it there.

    Login or Signup to reply.
  2. Given your block type name Permission. Go to System-> Permission->Block and Add to New Block catalog/product_list and also allowed to it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search