/vendor/magento/module-eav/Model/Entity/Attribute/ScopedAttributeInterface.php
There are 3 defined scopes
/**
* @api
* @since 100.0.2
*/
interface ScopedAttributeInterface
{
const SCOPE_STORE = 0;
const SCOPE_GLOBAL = 1;
const SCOPE_WEBSITE = 2;
}
and here is the DB for
entity_type_code
mysql> SELECT entity_type_id, entity_type_code FROM eav_entity_type;
+----------------+------------------+
| entity_type_id | entity_type_code |
+----------------+------------------+
| 1 | customer |
| 2 | customer_address |
| 3 | catalog_category |
| 4 | catalog_product |
| 5 | order |
| 6 | invoice |
| 7 | creditmemo |
| 8 | shipment |
+----------------+------------------+
So above all entities, Which Entity Allows scope attributes.
customer
and customer_address
Does not support Scope Attribute [Global]
catalog_category
and catalog_product
Does support Scope Attribute [Default, Website and Store]
So the question is Sales tables does support Scope Attribute ?
Because sales tables are stored as flat tables in Magento.
5: order
6: invoice
7: creditmemo
8: shipment
Best Answer
customer
andcustomer_address
Does not support Scope Attribute [Global]catalog_category
andcatalog_product
Does support Scope Attribute [Default, Website and Store]Sales DOES NOT support Scope Attributes.
Confirmation 1 : Check the
eav_entity_type
table in Magento 2attribute_model
andentity_attribute_collection
is NULL for sales related entities.Confirmation 2 : Check
getDefaultEntities
function inSetup
folder, It clears the doubt.In Conformation 2 -
getDefaultEntities
is Scope wise for Customer Attributes and Catalog as well Categories But Sales DOES NOT support Scope Attributes, It is not defined in Setup.