I m trying to add customer grid to magento admin product detail page.but it didn't display.I had googed and try but i can't find any resource for the same.Please some one can help to achieve this.

It would be great if someone can help on this topic. enter image description here

  • can not understand what is the requirement,please explain briefly – Amit Bera Jan 12 '15 at 7:32
  • have added image what i want to do in product edit page. – Zaheerabbas Jan 12 '15 at 7:36

Feedom ,

Step1: Create new tab using Inchoo Blog.This block is help you to crate new tab in porduct tab.

Step2: According to your requirement you need to show an subgrid which will show list of customer which are placed this product. You need to change code of class Inchoo_CustomLinkedProducts_Model_Catalog_Product



Code :

$collection = Mage::getModel("sales/order_item")->getCollection()
  ->addFieldToFilter("product_id", $this->_getProduct()->getId());

$collection->getSelect()->join( array('sales_order'=>Mage::getSingleton('core/resource')->getTableName('sales/order')),
        'main_table.order_id = sales_order.entity_id', array('sales_order.customer_id'));
$collection->getSelect()->where('customer_id IS NOT NULL');

More details will come shortly

| improve this answer | |

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.