I saw a serious issue with Select type attributes in Magento.

If backend model of a select attribute is other than INT (for example : varchar, text) etc. then if we edit this attribute via admin side and save, then it's backend type will be changed to INT

This is a serious issue because this will leads to indexing issues, product disappears from categories and search and abnormal sorting issues.

Why Magento behaves like this? How can we overcome this ?

As of now, It seems that, it is better to create All select attribute with a backend model INT


It seems that, we need to stick on INT type whenever we want to create a select attributes. Reasons are well described in my own blog

Main points are:

  • Suppose you have a select attribute which backend type is varchar. Everything is fine. You can assign this attribute to an attribute set and all products are saving all it’s values as we need. Now you came to a situation in which you want to update this attribute via backend. Of course, you can do this via admin side, Catalog > Attributes > Manage Attributes > [Select Your Attribute] > [Do all changes] > SAVE. Bingo attribute is updated, but if you check your database an important hack is done without your knowledge which is backend type of your attribute is now INT and not VARCHAR. This is definitely going to make problems in future. Why Magento changes backend type of attribute while save via backend. I really don’t know and I feel it’s as serious bug.

  • Suppose you have a configurable product attribute which backend type is varchar. You did a massive product import to your system. Now configurable product won’t show in category and even in search page. There is no problem with other simple products which uses same attribute, but configurable product won’t show in the assigned category pages. I don’t know the real reason behind this. But most probably this is an indexing issue. Instead if all of your configurable attributes are using backend type as INT, then there is no problem at all.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.