Home » Magento tutorials » Creating Magento configurable magento product: MAGENTO’S undocumented requirements for configurable attributes

Creating Magento configurable magento product: MAGENTO’S undocumented requirements for configurable attributes

When creating Magento configurable magento product, you see the error “This attribute set does not have attributes which we can use for configurable product”, how to solve this?

I ran into this issue recently, while trying to create a configurable product in Magento. After clicking the Add Product button and selecting Configurable Product …

Magento_Admin_Catalog_Product_Add_CreateProductSettings_Configurable[1]

I encountered a dead end and the following message:

This attribute set does not have attributes which we can use for configurable product”

 Magento_Admin_Catalog_Product_Add_Configurable_SelectConfigurableAttributes_NoneAvailable[1]

I was surprised because I had already created several eligible attributes, I began double-checking my attribute configuration. Magento provides this helpful(?) tip:

Only attributes with scope “Global”, input type “Dropdown” and Use To Create Configurable Product “Yes” are available.

Seems simple enough, but it’s not quite. After many hours double checking my attributes, creating new attribute sets, disabling modules, reinstalling my database from scratch and attempting all sorts of desperate debugging tactics, I was surprised to learn that there are actually two more requirements: the attribute must be visible (not an issue for me) and the attribute must be set to user defined.

The following code from the class Mage_Catalog_Model_Product_Type_Configurable shows the true requirements for a configurable attribute:

The key, for me, was setting the attributes’ user_defined property to true. If you create your attributes through the Admin UI, then user_defined will automatically be set to true. However, if you define your attributes in a setup script, as I did, you must set it manually.

To modify this field for an existing attribute, edit the database table. There is no way to edit this property through Magento’s admin interface.

UPDATE eav_attribute SET is_user_defined=1 WHERE attribute_code=’color’;

Magento_DB_eav_attribute_is_user_defined_part11[1]

Refresh the page you were stuck on and you should now see a configurable attribute:

Magento_Admin_Catalog_Product_Add_Configurable_SelectConfigurableAttributes[1]

That’s it! I hope this saves you some debugging time!

About Alan Storm

avatar
Alan Storm is a technology strategist, software developer and writer living and working in Portland, OR. He publishes articles on his website http://alanstorm.com and is the creator of the Magento development extension Commerce Bug.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Scroll To Top