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

The Archive Base Latest Questions

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

I am developing a small Magento-extension for grouped products. This extension needs another attribute,

  • 0

I am developing a small Magento-extension for grouped products. This extension needs another attribute, so I figured I could just write a setup script which adds a new attribute to grouped products. But as pretty much everything I tried to do in Magento, that turned out to be way more complex than I expected. The official Magento forum is no real help, so I hope for some support here 🙂

The new attribute should only appear in the “General” tab of grouped products; simple products, configurable products, bundle products etc. should stay unaltered. The attribute should be there independently of the selected attribute set, just like it was a system attribute.

To do so I thought I could just add the attribute to the entity of grouped products, but as I found out, there’s no special entity for grouped products, only the entity “catalog_product” for products in general. Thus my next thought was, I needed to add the attribute to the “catalog_product” entity and then assign it to the correct attribute group, so that it only applies to grouped products.

Problem is that I am not that deep into Magento yet and I have totally no clue how I am supposed to find the corresponding attribute group or if my idea is gonna work at all, maybe I’m totally on the wrong track here :/

Just to let you know what I got so far:
I registerd my setup script in the extension’s config file and it is being executed, only problem is the setup script itself, it looks like the following atm, because – as I said – I have no clue yet:

$installer = $this;
$installer->startSetup();
$installer->addAttribute("catalog_product", "my_attrib_name", array( /* just a placeholder */ ));
$installer->endSetup();

Pretty basic…

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

    I figured out how to do it on my own now. My approach was correct, I just needed to find the corresponding parameters.

    The addAttribute()-call looks like the following now:

    // ...
    $installer->addAttribute(
        "catalog_product", // Entity the new attribute is supposed to be added to
        "my_attrib_code", // attribute code
         array( // Array containing all settings:
            "type" => "varchar",
            "label" => "My attribute",
            "note" => "Insert additional information about the attribute here",
            "input" => "text",
            "global" => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
            // Dont know if this is really necessary, but it makes sure 
            // the attribute is created as a system attribute:
            "user_defined" => false,
            // This makes sure the attribute only applies to grouped products
            "apply_to" => Mage_Catalog_Model_Product_Type::TYPE_GROUPED
        )
    );
    // ...
    

    Now the attribute added by the installer is a system attribute, it gets automatically added to the “General” group of every attribute set and cannot be changed/moved. As I intended it also only applies to grouped products.

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

Sidebar

Related Questions

I'm developing a small utility application that needs to detect whether another one has
I am developing a small extension that has to redirect certain URLs to another
I am developing an small application in a android. Before this i had done
I'm developing a small utility script for trac which needs to know which is
I am developing a small project and I thought I could try something I
I'm developing small FTP upload app. for mac (10.6 if it matters) Have problem
I have a little experience developing small command-line applications with Python. I want to
Im developing a small web aplication, used in a shared computer. When the user
I am developing a small web app project (ColdFusion) and I am trying to
I am developing a small application which lists the contents from files of a

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.