Help us improve
Share bugs, ideas, or general feedback.
From magento2-commerce
Work with Magento 2 EAV system: create custom product/category/customer attributes and sets, manage EAV tables, apply data patches.
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin magento2-commerceHow this skill is triggered — by the user, by Claude, or both
Slash command
/magento2-commerce:magento-eav-attributesThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Fetch live docs**:
Manages Magento 2 catalog: product types (simple, configurable, bundle), categories, attributes, indexing (price, fulltext, stock), and search. Use for custom catalog features.
Work with Saleor's typed attribute system—attribute types, product types, page types, variant selection attributes, and attribute-based filtering. Use when defining product schemas.
Explains the EAV schema pattern for storing dynamic user-defined attributes as rows, with tradeoffs and JSONB alternatives.
Share bugs, ideas, or general feedback.
Fetch live docs:
site:developer.adobe.com commerce php development components attributes for attribute development guidesite:developer.adobe.com commerce php tutorials backend custom-attributes for attribute creation tutorialmagento 2 EAV attribute data patch for current patterns using data patchesEntity-Attribute-Value is Magento's flexible storage pattern. Instead of one column per attribute, values are stored in separate typed tables. This allows merchants to add unlimited attributes without schema changes.
Four entity types use EAV:
catalog_product_entity)catalog_category_entity)customer_entity)customer_address_entity)Each entity has typed value tables:
*_entity — base entity table (entity_id, sku, type_id, etc.)*_entity_varchar — short text values*_entity_int — integer values (including boolean, select)*_entity_decimal — decimal/price values*_entity_datetime — date/time values*_entity_text — long text valuesKey properties when creating attributes:
The modern approach uses Data Patches with EavSetupFactory:
Setup/Patch/Data/EavSetupFactory (or CategorySetupFactory for categories)$eavSetup->addAttribute() with entity type, code, and propertiesFor select/multiselect attributes, source models provide options:
Magento\Eav\Model\Entity\Attribute\Source\Boolean, TableAbstractSource, implement getAllOptions()Attributes with type static are stored as columns directly on the entity table rather than in EAV value tables. Used for frequently queried fields (e.g., sku, type_id, created_at).
int for select/boolean, decimal for pricessearchable, filterable, comparable thoughtfully — each adds indexing overheadstatic type sparingly — it modifies the entity table schemasetup:upgradeFetch the attribute development docs for exact addAttribute() parameters, source model patterns, and current entity type constants before implementing.