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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:10:16+00:00 2026-05-27T21:10:16+00:00

just one simple but head-scratching question. I create a attribute, set it to Drop-Down

  • 0

just one simple but head-scratching question.

I create a attribute, set it to Drop-Down behavior (in Admin-Store, to be seen as a Drop-Down Attribute)
it is creating quiet smooth, but didn’t set the attribute_set.

In short:

is-state:
my attribute –> not linked to a attribute set

to-state:
my attribute –> linked to default attribute set

  • 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-27T21:10:17+00:00Added an answer on May 27, 2026 at 9:10 pm

    Administration Way:

    It is natural that a newly created attribute is not assigned to an attribute set (including the Default attribute set) automatically. You need to do it manually.

    In the Admin, under Catalog > Attributes > Manage Attribute Sets.

    source

    Programming Way:

    Try this code:

    $installer = Mage::getModel('eav/entity_setup');
    $installer->addAttributeToSet($entityTypeId, $setId, $groupId, $attributeId, $sortOrder);
    

    The specifications for function addAttributeToSet:

    • mixed $entityTypeId
    • mixed $setId
    • mixed $groupId
    • mixed $attributeId
    • int $sortOrder=null
    • @return Mage_Eav_Model_Entity_Setup

    The arguments ending with ‘Id’ don’t actually have to be ids according to the codes. Set and group names can be transalated to ids automatically. However for the attribute, you should use code (usually written in small letters, ex. ‘firstname’) rather than names (ex. ‘First Name’).

    For example, you want to add a product attribute called ‘popularity’ to the ‘Default’ attribute set under ‘General’ group, just write like this:

    $installer = Mage::getModel('eav/entity_setup');
    $installer->addAttributeToSet('catalog_product', 'Default', 'General', 'popularity');
    

    Unfortunately I don’t have an installation to test the code for the moment, hopefully it should work 🙂

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

Sidebar

Related Questions

This is hopefully a very simple question, but one a lot of Googling has
One simple method I've used in the past is basically just creating a second
My WPF test app (very simple, just one window) is using a 3rd party
We are just upgrading our ASP.Net shop implementation (from simple one) to structure that
It's really simple, I just want one screen. Wow, that [shiny thing] must have
Is there a one-line easy linq expression to just get everything from a simple
I've created two simple testpages. One loads the other one using XMLHttpRequest. (just a
simple problem, but perhaps no simple solution, at least I can't think of one
I'm sure I'm missing something very simple on this one. After banging my head
this might be a simple questions but I can't get my head around it.

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.