I'm trying to add a small form to the category view to each product by using the <catalog_category_view> layout handle. The block of my module already works on product detail pages (<catalog_product_view> in product.info block).

Is there some requirement for the product_list block to accept another child block which I'm calling explicitly by name within the catalog/product/list.phtml? My form block class extends the basic Mage_Core_Block_Template if it makes any difference.

edit: added source

<!-- working -->
    <reference name="product.info">
        <block type="annotations/form" template="productannotations/form.phtml" name="product_annotations" />

<!-- not working -->
    <reference name="product_list">
        <block type="annotations/form" template="productannotations/form.phtml" name="product_annotations" />

embeding the block directly via echo $this->getLayout()->createBlock('annotations/form', 'product_annotations')->setTemplate('productannotations/form.phtml')->toHtml() works on the other hand.

  • Can you post the code you have so far?
    – Marius
    Mar 18, 2015 at 11:29
  • @Marius added my layout.xml code. Also I changed the extending class from Mage_Core_Block_Template to Mage_Catalog_Block_Product_Abstract Mar 18, 2015 at 14:35

1 Answer 1


you can add new block like below.

<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
      <block type="core/template" name="product_custom_form" template="path/to/phtml"/>

In Listing file add code in foreach of product collection like below:

<?php foreach ($_productCollection as $_product): ?>
<form name="producid-form" action="yoururl">
    <?php echo $this->getChildHtml('product_custom_form'); ?>

Note: add only input fields in you form phtml

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.