Question

Why the product attribute input type is uneditable via admin panel once it created in Magento 2.

Can anyone explain?

My understanding is once the attribute values are entered and saved, the type of the attribute is changed then the previous values of the attribute which is assigned to the products may lose

Was it helpful?

Solution

As magento uses the eav structure and it stores all attributes of all entity into eav_attribute table .Where there is field named "backend_type" in which it has different values like varchar,text,int,decimal so according to type mentioned it creates different table for values .say for example product name is having varchar datatype in "backend_type" and it creates catalog_product_entity_varchar for all titles of products.

So if you change the datatype you will lose all attribute values ..

See attached screenshot for the same.enter image description here

OTHER TIPS

Yes, bcz every attribute type's data type is different for example for text data type is text as it saves data in catalog_product_entity_varchar , for dropdown data type is int as it save value catalog_product_entity_int, that' why magento don't allow to edit it bcz it may messup the functionality.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top