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

magento.stackexchange https://magento.stackexchange.com/questions/315247

سؤال

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

هل كانت مفيدة؟

المحلول

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

نصائح أخرى

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top