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-commerceThis skill is limited to using the following tools:
**Fetch live docs**:
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
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.