2

I'm trying to show products from a specific category in home page.

I have inserted content into CMS > Pages > HP as follow

A 
{{block type="catalog/product_list" column_count="4" category_id="28" template="catalog/product/list.phtml"}} 
B

Category 28 is anchor. Category 28 contains valid products. Cleared the cache many times.

When I reload the home page the result is: AB

  • you're missing "name" in the block (tho not sure if that will fix your issue). also did you make sure the products in that category are assigned to the website of this homepage? – Robin Nov 5 '15 at 14:07
  • I trying adding the name as follow {{block type="catalog/product_list" name="home.catalog.product.list" category_id="28" template="catalog/product/list.phtml"}} still not working. Yes products in that category are assigned to the website of the home page – Michele Nov 5 '15 at 14:10
  • how about changing column_count to products_count or max_shown? – Robin Nov 5 '15 at 14:17
  • tried both and still not working. By the way, on top of catalog/product/list.phtml I'm printing some chars to be sure the phtml is called but it's not – Michele Nov 5 '15 at 14:21
  • Do I need to have something inside page_layout_update_xml ? – Michele Nov 5 '15 at 14:31
2

As said in this recent thread, in versions above 1.9.2.2 (or previous versions with all security patches applied) Magento requires permission to load specific widgets or blocks.

You gotta create this permission in 'System->Permissions->Blocks' menu, as catalog/product_list

It worked for me. Good luck!

0

Ok, the only way I found to show the category products in home page is to paste this code inside page_layout_update_xml

<reference name="content">
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>28</category_id></action>
</block>
</reference>

Buttons "compare" and "add to cart" were only hidden

0

Check to see if your category (id 28) is under your root category, it should not be another root category otherwise its not displayed

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.