0

In the

Magento_Catalog

module i have seen there are three different configuration (xml) files related to the catalog attributes, those three files are

catalog_attributes.xml vs eav_attributes.xml vs extension_attributes.xml

So my question is what is the difference between these three files, what are the specific usages of these three files ?

1 Answer 1

3

catalog_attributes.xml

It contains the list of attributes that serve different purposes.

For example, the group used_in_autogeneration is for listing attributes that have the value autogenerated.

The group quote_item represents the attributes that are going to be copied from the product to the quote item.

unassignable contains the list of attributes that cannot be unassigned from any attribute set.

eav_attributes.xml

It provides the EAV attributes configuration.

For example, in vendor/magento/module-catalog/etc/eav_attributes.xml you can see many attributes like sku, status, etc and the configuration says about those attributes like if the attribute is global or it is searchable or filterable. Similar things that we do while creating a custom attribute using the Data Patch.

extension_attributes.xml

Extension Attributes are used to extend functionality and often use more complex data types than custom or eav attributes. These attributes do not appear in the Magento Admin.

extension_attributes.xml is used for declaring the extension attributes for the module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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