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

  • Home
  • SEARCH
  • 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 6906297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:17:30+00:00 2026-05-27T08:17:30+00:00

I have created a custom tab in admin which I need to manage customer

  • 0

I have created a custom tab in admin which I need to manage customer attributes.

I would like to load all customer attributes in that section and keep a check box against each attribute.

Such that when ever a check box is checked or unchecked, based on the selection, the columns will be displayed/hidden in Manage Customer Grid.

I would like to know how do I get to display all customer attributes in that section with a checkbox each?

  • 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-27T08:17:31+00:00Added an answer on May 27, 2026 at 8:17 am

    You can use getAttributes() which returns an array of Mage_Eav_Model_Entity_Attribute.

    <?php
    $attributes = Mage::getModel('customer/customer')->getAttributes();
    foreach ($attributes as $attr) :
    ?>
        <input type="checkbox" name="attributes[]" value="<?php echo $attr->getId() ?>" id="attribute-<?php echo $attr->getId() ?>" />
        <label for="attribute-<?php echo $attr->getId() ?>"><?php echo $attr->getStoreLabel() ?></label>
    <?php endforeach; ?>
    

    Much improved technique for config:

    First we need to create a source model in your module, in the following you obviously have to rename it to match your actual module.

    class Your_Module_Model_Source_Customer_Attribute
    {
        public function toOptionArray()
        {
            $attributes = Mage::getModel('customer/entity_attribute_collection')
                // remove filter to allow default address ID, etc.
                ->addVisibleFilter();
            $result = array();
            foreach ($attributes as $attribute) {
                if (($label = $attribute->getFrontendLabel()))
                    $result[$attribute->getId()] = $label;
            }
            return $result;
        }
    }
    

    Then we need a single new field in your module’s system.xml.

    <fieldname translate="label">
        <label>Customer Attributes</label>
        <frontend_type>checkboxes</frontend_type>
        <source_model>yourmodule/source_customer_attribute</source_model>
        <show_in_default>1</show_in_default>
    </fieldname>
    

    This works surprisingly well, surprising because these classes are not used in the core. Instead of checkboxes the type can also be radios, that works too.

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

Sidebar

Related Questions

I have created a custom tag that looks like this: def textField = {
I'd like to implement a custom TabLayoutPanel which would automatically setup the tab itself
I have created a custom module which displays a tab and a section in
I am implementing a tab;e in which i have created a custom cell for
I have created custom MembershipUser, MembershipProvider and RolePrivoder classes. These all work and I
If have created a custom role within SqlServer which I added to the db__denydatareader
I have created a custom list as a feature in sharepoint. i need to
I have created a custom ExpandableListAdapter and everything works properly. What I'd like to
I have created a custom workflow activity that copies attachments from a case to
I'm trying to create a custom tab navigator that has to look like this

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.