How can i add my custom block in catalog category page

enter image description here

<catalog_category_layered translate="label">
    <label>Catalog Category (Anchor)</label>
    <reference name="content">
        <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
            <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
                <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                    <block type="page/html_pager" name="product_list_toolbar_pager"/>
<!-- i add my block here  -->
                    <block type="quickview/quickview" name="quickview" template="quickview/quickview.phtml" />
  • you can call your block file as $this->getChildHtml('quickview') in list.phtml Jan 19 '15 at 7:07

You can always modify your phtml file which displays product listing on category page,

Go to below Path app/design/frontend/default/yourtheme/template/catalog/product/list.phtml

you can set your custom text according the html structure here...

  • i dont want to edit my .phtml file Jan 19 '15 at 7:19
  • any reason ? this we always do to get our look and feel ? Jan 19 '15 at 7:22
  • 1
    i want to do this using reference Tag Jan 19 '15 at 7:26
  • I don't think you can do that, because from reference tag you always call other block after or before block. this you need within list.phtml. Experts can verify :) Jan 19 '15 at 7:37
  • @Amit Bera...in which file you will add this code ? as it see it is again code change only. Jan 19 '15 at 7:45

vaibhav ahalpara,you can do anything without changing at list.phtml;

You want to call this block for all products

echo past the code at

    echo   $this->getLayout()->createBlock('quickview/quickview')

and this code id put inside of loop of products thus it can be show for all products:

Add this code below $this->getPriceHtml()

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.