Search code examples
phpmysqlmagentojqgridentity-attribute-value

Magento - > I want the product grid in admin to be displayed in frontend


I want the grid in admin to be displayed in frontend. The grid that shows the list of products in admin-> catalog->manage products.

I want to show this on the frontend for each category?

What would be ideal approach to get this done?


Solution

  • You need to rewrite blocks

    Mage_Adminhtml_Block_Catalog_Product_Grid
    Mage_Adminhtml_Block_Widget_Container
    

    to your own, because in this classes we have logic for editing, adding products.

    also you need to redefine

    adminhtml/default/default/template/catalog/product.phtml
    adminhtml/default/default/template/widget/grid.phtml
    

    and add templates to the frontend scope with your customizations.

    add to the frontend catalog.xml blocks declaration for catalog_category_default node it might be like this:

    <catalog_category_default>
        <reference name="content">
            <block name="module_name/catalog_product_grid" template="module_name/catalog_product_grid.phtml" output="toHtml />
        </reference>
    </catalog_category_default>