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 6884891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:33:58+00:00 2026-05-27T05:33:58+00:00

As per bens comment and answer I updated my script, comments indicate changes {Magento

  • 0

As per bens comment and answer I updated my script, comments indicate changes

{Magento 1.4.0.1} currently i have an installer script:

$installer = $this;
$installer->startSetup();

//commented out to use factory method
//$setup = new Mage_Catalog_Model_Resource_Eav_Mysql4_Setup('core_setup');
$setup = Mage::getResourceModel('catalog/setup','core_setup');    

if(!$setup->getAttribute('catalog_product','attribute_code')){
    $newFields = array(
        'attribute_code' => array(
            'type'              => 'text',
            'label'             => 'Attribute Label',
            //added visible option
            'visible'           => false,
        ),
    );

    $entities = array(
        'catalog_product',
    );

    foreach($newFields as $attributeName => $attributeDefs) {
        foreach ($entities as $entity) {
            $setup->addAttribute($entity, $attributeName, array(
                'type'                          => $attributeDefs['type'],
                'label'                         => $attributeDefs['label'],
                //added visible option
                'visible'                       => $attributeDefs['visible'],
                'class'                         => '',
                'required'                      => false,
            ));
        }
    }
}

$installer->endSetup();

It works wonderfully! Except the attribute shows up in the General attribute group when editing the product and I don’t want it to show up at all (its a secret ninja attribute) is there something I’m doing wrong? or perhaps something I should be doing to let Magento know not its not supposed to show up?

  • 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-27T05:33:58+00:00Added an answer on May 27, 2026 at 5:33 am

    Using addAttribute() you can set the ‘visibleindex tofalse. UsingupdateAttribute()` you should do the following:

    $setup->updateAttribute('catalog_product','attr_code','is_visible',false);
    

    Let me know if I’m wrong.

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

Sidebar

Related Questions

As per the comment under this answer , references were introduced primarily to support
Per this helpful article I have confirmed I have a connection pool leak in
Per a great answer from another question I have begun mounting global resources (css/js/images)
Per this question (see comments near the bottom), I was wondering if anyone knows
as per the title; is it possible to have nested comments in valid HTML?
As per the Emacs docs , every time you open a file, Emacs changes
Per this excellent eye-opener article written by a sec. expert , I become quite
per the debate in this post: json-conversion-in-javascript
Per an answer to a previous question (answer here: SQL/Database Views in Grails ),
per my question Aes Encryption... missing an important piece , I have now learned

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.