TransWikia.com

Difference between catalog_attributes.xml vs eav_attributes.xml vs extension_attributes.xml

Magento Asked by Zeeshan Khuwaja on October 1, 2021

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 ?

One Answer

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.

Correct answer by Anshu Mishra on October 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP