Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

‘catalog/product_list’ block does not display on the product view page.  Any ideas? 
 
puress
Jr. Member
 
Total Posts:  5
Joined:  2012-04-24
 

Hi folks,

I have a custom navigation drop down which displays products from a specific category.  The nav is meant to be visible on all pages throughout the website as it is the primary navigation.

I have set up the nav to display using custom blocks in order to be able to update the content easily.

I have added the below code to a custom block and created a custom template page “list_nav.phtml”

{{block type="catalog/product_list" category_id"38"template"catalog/product/list_nav.phtml"

This works fine on every page apart from the product view page, where the menu item just doesn’t show at all.  If I just add basic text then it displays fine.

I have had a look around and it seems it may be down to the “catalog/product_list"not working correctly on product pages?

Any ideas what code will display correctly throughout the whole site regardless of what page is being viewed??  I have tried changing it to “catalog/product_list_random” with no luck.

Many thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
puress
Jr. Member
 
Total Posts:  5
Joined:  2012-04-24
 

I managed to fix this myself.

I changed:

{{block type="catalog/product_list" category_id"38"template"catalog/product/list_nav.phtml"}}

to:

{{block type="core/template" category_id="38" template="catalog/product/list_nav.phtml"}}

The block now shows on all pages throughout the site.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ryanb4614
Jr. Member
 
Total Posts:  8
Joined:  2012-06-10
 
puress - 03 January 2013 05:05 PM

I managed to fix this myself.

I changed:

{{block type="catalog/product_list" category_id"38"template"catalog/product/list_nav.phtml"}}

to:

{{block type="core/template" category_id="38" template="catalog/product/list_nav.phtml"}}

The block now shows on all pages throughout the site.

I am having the same issue.

{{block type="core/template" category_id="38" template="catalog/product/listmenu.phtml"}}

doesn’t work for me. It shows the static block but then my product information doesn’t appear. The issue is the block type. Can anyone please offer some help.

This is my listmenu.phtml:

<table width="300px" class="menutablelayout" border="0">
  <
tr>
    <
td><?php
$_productCollection
=$this->getLoadedProductCollection();
foreach (
$_productCollection as $_product): ?>
<div>
<
a href="<?php echo $_product->getProductUrl() ?>"
<h4><?php echo $this->stripTags($_product->getName());?></h4>
<
img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(300); 
?>" 
width="300" height="300" alt="<?php 
echo 
$this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
<?php echo $this->getPriceHtml($_producttrue?>
</div>
<?php endforeach; ?></td>
  </
tr>
</
table>
</
a></div>
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top