0

Has anyone tried to remove(not delete) unnecessary attributes from the Magento default set? By default, Magento create an attribute set called "default" and it has a lot of unnecessary attributes. But we can not remove an attribute from the set if it is a system attribute.

I can retrieve all attribute in set by:

\Magento\Eav\Model\AttributeManagement::getAttributes($entityType, $attributeSetId)

after that, I don't have any ideal to check if it is a system attribute. Please help.

0

I figured out a solution. Magento has a configuration to check if an attribute is system.

\Magento\Catalog\Model\Attribute\Config::getAttributeNames('unassignable');

After get all system attribute, i can remove other attributes in eav_entity_attribute table

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.