Xabby
Xabby

Reputation: 437

Block Code is not working on magento CMS page

I am showing products from a category on a CMS page by using following code but it not showing anything on front end please have a look and let me know what wrong i am doing

I have used this code:

{{block type="catalog/product_list" category_id="3"template="catalog/product/listhp.phtml"}}

Upvotes: 0

Views: 433

Answers (2)

TheFrakes
TheFrakes

Reputation: 181

I had the same issue Xabby described.

Option #2 by Shivani worked like a charm. Did not know these permissions were necessary. In case someone is wondering, these are the steps:

  1. Navigate to System > Permissions > Blocks
  2. Add the block - Enter "catalog/product_list" in the field
  3. Set Allowed to Yes

Upvotes: 0

Shivani
Shivani

Reputation: 526

Option #1

If the below is your code:

{{block type="catalog/product_list" category_id="3"template="catalog/product/listhp.phtml"}}

Give a SPACE between category_id="3" and template="..."

Updated code must be:

{{block type="catalog/product_list" category_id="3" template="catalog/product/listhp.phtml"}}

Let me know if that works.

[Editing the answer as it can be more than 1 options]

Option #2

  1. Navigate to System > Permissions > Blocks
  2. Add the block - Enter "catalog/product_list" in the field
  3. Set Allowed to Yes

Clear cache and check.

Hope this helps someone. Happy to Help!

Happy Coding...

Upvotes: 2

Related Questions