In Magento, you can't create a custom attribute of type "decimal" or "price".
But it's possible to create the attribute as text, and change the backend_type in it's database record from "varchar" to "decimal" or "int". (table: eav_attribute)
But, Magento keeps changing it back to "varchar!!" Why?
Best Answer
Magento will validate and change attribute
backend_type
when you save the attribute from admin panel (Catalog > Attributes > Manage Attributes
).I believe that the install script does not validate this so it's possible, for example, to create
select
attribute withvarchar
type. This does not mean it's OK to do it, in fact you should avoid it because you'll end up with a 'broken' attribute.