Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6812319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:26:05+00:00 2026-05-26T20:26:05+00:00

I wanted to add a column to Admin Customer Grid is_onHold (there is column

  • 0

I wanted to add a column to Admin Customer Grid is_onHold (there is column in customer_entity table named is_onHold, tinyint(1) {want to store boolean value}).

I tried Fabrizio d solution from : Magento – Add column to customer grid, but, it’s giving fatal error when trying to filter result based on the column added.

I added following code in _prepareColumns():

$this->addColumn('is_onHold', array(
            'header'    => Mage::helper('customer')->__('On Hold?'),
            'width'     => '150',
            'index'     => 'is_onHold',
            'type'      => 'options',
            'options'   => array(
              1 => 'Yes',
              0 => 'No',
          )
        ));

and following code in _prepareCollection():

->addAttributeToSelect('is_onHold')

It works perfectly, and column is added to the grid, but, when I try to filter the record based on newly added column, I get error
Mage EAV Error

when I checked the corresponding error report, it says:

a:5:{i:0;s:34:"Invalid attribute name: is_onHold.";i:1;s:5418:"#0 E:\wamp\www\magePrj\app\code\core\Mage\Eav\Model\Entity\Collection\Abstract.php(1166): Mage::exception('Mage_Eav', 'Invalid attribu...')
1 E:\wamp\www\magePrj\app\code\core\Mage\Eav\Model\Entity\Collection\Abstract.php(1255): Mage_Eav_Model_Entity_Collection_Abstract->_addAttributeJoin('is_onHold', 'inner')
2 E:\wamp\www\magePrj\app\code\core\Mage\Eav\Model\Entity\Collection\Abstract.php(292): Mage_Eav_Model_Entity_Collection_Abstract->_getAttributeConditionSql('is_onHold', Array, 'inner')
3 E:\wamp\www\magePrj\app\code\core\Mage\Eav\Model\Entity\Collection\Abstract.php(312): Mage_Eav_Model_Entity_Collection_Abstract->addAttributeToFilter('is_onHold', Array)
4 E:\wamp\www\magePrj\app\code\core\Mage\Adminhtml\Block\Widget\Grid.php(449): Mage_Eav_Model_Entity_Collection_Abstract->addFieldToFilter('is_onHold', Array)

Is this because I am trying to use type options for a boolean column?
I am not sure what I am doing wrong…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T20:26:06+00:00Added an answer on May 26, 2026 at 8:26 pm

    I’ve found the solution to the problem I was facing.
    After banging my head against the wall for hours.

    Actually, there was nothing wrong with using any data type for column. So, the problem was not in the table.

    I checked all related files. And, finally, found where the problem was.
    Actually, I was right till:

    $this->addColumn('is_onHold', array(
            'header'  => Mage::helper('customer')->__('On Hold?'),
            'width'   => '120',
            'index'   => 'is_onHold',
            'type'    => 'options',
            'options' => array('1' => 'Yes', '0' => 'No')
    ));
    

    and

    ->addAttributeToSelect('is_onHold')
    

    But, I think when you use above method, you need to make one additional change to Mage_Customer_Model_Entity_Customer->_getDefaultAttributes() and your columns there…

    like I did :

    return array(
                'entity_type_id',
                'attribute_set_id',
                'created_at',
                'updated_at',
                'increment_id',
                'store_id',
                'website_id',
                'is_onHold',
                'hold_till'
            );
    

    Last 2 in the array are columns added by me…

    Hope this will help someone…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: i'm using InstantRails 2.0 I wanted to add a new column to an
I wanted to add a new property to one of my model (table). Basically
I wanted to add 2 columnts to an MSSQL table by changing class and
I have a column in my SQL table, that I wanted to make a
I wanted to add a table and a foreign key to that table. Initially
I want to add some columns to a table (Swing JTable). Some of them
I wanted to add a new column to an Android SQLite Database and then
I wanted to add a StackOverflow-style tag input to a blog model of mine.
I wanted to add some analytics functionnalities to my app so I created an
I wanted to add <br> after every 2 loops. The loop will run 8

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.