am tring to show a Custom Customer attribute in Customer Grid by using this code http://www.atwix.com/magento/add-column-to-customers-grid-alternative-way/

its showing the values if am using default magento columns as index but how can i use a custom text field attribute ?

        if ($block->getType() == 'adminhtml/customer_grid') {
/* @var $block Mage_Adminhtml_Block_Customer_Grid */
        $block->addColumnAfter('origin', array(
            'header'    => 'origin',
            'type'      => 'text',
            'index'     => 'entity_id',
        ), 'group');

1 Answer 1


First of all, you have to create the custom Customer attribute you want to use. You may use the install script to create this attribute.
See this answer: Adding custom attribute to Customer
Then use attribute's code as index.

  • i have already installed an extension to create customer attribute,and created a custom attribute using that.
    – Jijesh
    Jan 8, 2015 at 11:39
  • Are u sure attribute is added ? Also what error are you getting when give the new attribute code as index ?
    – Hashid
    Jan 8, 2015 at 11:44
  • No Errors, the values are not displaying but i think they automatically adding some prefix in the index value.
    – Jijesh
    Jan 8, 2015 at 11:54

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.