Magento 2 Catalog & Product Types
Before writing code
Fetch live docs:
- Web-search
site:developer.adobe.com commerce php development components catalog for catalog development
- Web-search
site:developer.adobe.com commerce php development components indexing for indexer guide
- Fetch
https://developer.adobe.com/commerce/php/development/components/indexing/ for indexing architecture
Product Types
Six Built-in Types
| Type |
Description |
Key Characteristics |
| Simple |
Single physical item |
Unique SKU, own stock, no variations |
| Configurable |
Parent with variant children |
Children are simple products, vary by attributes (size, color) |
| Grouped |
Collection of products |
Simple/virtual children, purchased independently |
| Bundle |
Customer-assembled set |
Options with selectable items, dynamic/fixed pricing |
| Virtual |
Non-physical (services) |
No shipping, no weight |
| Downloadable |
Digital products |
Files/links, optional samples |
Configurable Products
The most complex type — a parent product with simple product children:
- Super attributes determine variations (e.g., color, size)
- Each combination maps to a child simple product with its own SKU and stock
- Frontend: dropdown selectors, price updates, image swapping
- Key tables:
catalog_product_super_attribute, catalog_product_super_link
Custom Product Types
Possible to create custom types by:
- Extending
Magento\Catalog\Model\Product\Type\AbstractType
- Registering in
etc/product_types.xml
- Defining custom price model, stock handling, and checkout behavior
Categories
Category Tree
- Hierarchical structure with root categories and subcategories
- Each store view has one root category
- Categories use EAV for attributes
- URL rewrites generate SEO-friendly paths
- Display modes: products only, CMS block only, both
Category Attributes
name, description, image, meta_title, meta_description
is_active, include_in_menu, display_mode
url_key, url_path
- Custom attributes addable via data patches
Indexing
Why Indexing Exists
EAV queries are expensive. Indexers pre-compute denormalized data for fast reads.
Standard Indexers
catalog_product_price — pre-computed product prices
catalogsearch_fulltext — search engine index (OpenSearch/Elasticsearch)
catalog_product_attribute — filterable attributes for layered navigation
cataloginventory_stock — stock status
catalogrule_product — catalog price rules
catalog_category_product — category-product associations
Index Modes
| Mode |
Behavior |
Use Case |
| Update on Save |
Reindexes immediately on data change |
Small catalogs, development |
| Update by Schedule |
Cron-based, uses changelog tables |
Production (recommended) |
Mview (Materialized Views)
Changelog tables (*_cl) track changes via database triggers. Cron compares versions in mview_state to determine what needs reindexing. Efficient — only processes changed entities.
CLI Commands
bin/magento indexer:reindex # Reindex all
bin/magento indexer:reindex catalogsearch_fulltext # Reindex specific
bin/magento indexer:status # Show status
bin/magento indexer:set-mode schedule # Set all to schedule mode
Search Integration
- A search engine has been required since 2.4.0 (originally Elasticsearch; OpenSearch supported from 2.4.6; only OpenSearch from 2.4.8)
- Products, categories indexed for search and layered navigation
- Elasticsearch removed in 2.4.8
- Custom search attributes configurable per attribute
Best Practices
- Use "Update by Schedule" indexing in production
- Design catalog structure before adding products — attribute sets are hard to change later
- Use configurable products for variant-heavy catalogs
- Keep EAV attribute count reasonable — more attributes = slower indexing
- Test catalog operations at scale (1000+ products) to catch performance issues
- Use the repository pattern (
ProductRepositoryInterface) for programmatic product access
Fetch the catalog and indexing docs for exact indexer configuration, product type XML schema, and search integration patterns before implementing.
1---2name: magento-catalog3description: Work with Magento 2 catalog — product types, categories, attributes, indexing, and search integration. Use when building catalog features, customizing product types, or working with the catalog architecture.4---5
6# Magento 2 Catalog & Product Types
7
8## Before writing code
9
10**Fetch live docs**:
111. Web-search `site:developer.adobe.com commerce php development components catalog` for catalog development
122. Web-search `site:developer.adobe.com commerce php development components indexing` for indexer guide
133. Fetch `https://developer.adobe.com/commerce/php/development/components/indexing/` for indexing architecture
14
15## Product Types
16
17### Six Built-in Types
18
19| Type | Description | Key Characteristics |
20|------|-------------|-------------------|
21| **Simple** | Single physical item | Unique SKU, own stock, no variations |
22| **Configurable** | Parent with variant children | Children are simple products, vary by attributes (size, color) |
23| **Grouped** | Collection of products | Simple/virtual children, purchased independently |
24| **Bundle** | Customer-assembled set | Options with selectable items, dynamic/fixed pricing |
25| **Virtual** | Non-physical (services) | No shipping, no weight |
26| **Downloadable** | Digital products | Files/links, optional samples |
27
28### Configurable Products
29
30The most complex type — a parent product with simple product children:
31- Super attributes determine variations (e.g., color, size)
32- Each combination maps to a child simple product with its own SKU and stock
33- Frontend: dropdown selectors, price updates, image swapping
34- Key tables: `catalog_product_super_attribute`, `catalog_product_super_link`
35
36### Custom Product Types
37
38Possible to create custom types by:
39- Extending `Magento\Catalog\Model\Product\Type\AbstractType`
40- Registering in `etc/product_types.xml`
41- Defining custom price model, stock handling, and checkout behavior
42
43## Categories
44
45### Category Tree
46
47- Hierarchical structure with root categories and subcategories
48- Each store view has one root category
49- Categories use EAV for attributes
50- URL rewrites generate SEO-friendly paths
51- Display modes: products only, CMS block only, both
52
53### Category Attributes
54
55- `name`, `description`, `image`, `meta_title`, `meta_description`
56- `is_active`, `include_in_menu`, `display_mode`
57- `url_key`, `url_path`
58- Custom attributes addable via data patches
59
60## Indexing
61
62### Why Indexing Exists
63
64EAV queries are expensive. Indexers pre-compute denormalized data for fast reads.
65
66### Standard Indexers
67
68- `catalog_product_price` — pre-computed product prices
69- `catalogsearch_fulltext` — search engine index (OpenSearch/Elasticsearch)
70- `catalog_product_attribute` — filterable attributes for layered navigation
71- `cataloginventory_stock` — stock status
72- `catalogrule_product` — catalog price rules
73- `catalog_category_product` — category-product associations
74
75### Index Modes
76
77| Mode | Behavior | Use Case |
78|------|----------|----------|
79| **Update on Save** | Reindexes immediately on data change | Small catalogs, development |
80| **Update by Schedule** | Cron-based, uses changelog tables | Production (recommended) |
81
82### Mview (Materialized Views)
83
84Changelog tables (`*_cl`) track changes via database triggers. Cron compares versions in `mview_state` to determine what needs reindexing. Efficient — only processes changed entities.
85
86### CLI Commands
87
88```bash
89bin/magento indexer:reindex # Reindex all
90bin/magento indexer:reindex catalogsearch_fulltext # Reindex specific
91bin/magento indexer:status # Show status
92bin/magento indexer:set-mode schedule # Set all to schedule mode
93```
94
95## Search Integration
96
97- A search engine has been required since 2.4.0 (originally Elasticsearch; OpenSearch supported from 2.4.6; only OpenSearch from 2.4.8)
98- Products, categories indexed for search and layered navigation
99- Elasticsearch removed in 2.4.8
100- Custom search attributes configurable per attribute
101
102## Best Practices
103
104- Use "Update by Schedule" indexing in production
105- Design catalog structure before adding products — attribute sets are hard to change later
106- Use configurable products for variant-heavy catalogs
107- Keep EAV attribute count reasonable — more attributes = slower indexing
108- Test catalog operations at scale (1000+ products) to catch performance issues
109- Use the repository pattern (`ProductRepositoryInterface`) for programmatic product access
110
111Fetch the catalog and indexing docs for exact indexer configuration, product type XML schema, and search integration patterns before implementing.