![]() |
VOOZH | about |
The Catalog Module is the core product and category management system in Maho. It provides the EAV-based data models, indexing infrastructure, and rendering blocks for displaying products and categories on both the frontend storefront and backend admin interface. This page provides an architectural overview of the catalog system.
For detailed information about specific subsystems, see:
For foundational EAV concepts, see EAV System. For indexing architecture, see Indexing System.
The Catalog Module follows Maho's standard module structure with models, blocks, controllers, and resource models organized under the Mage_Catalog namespace. The module declares itself with version 1.6.0.0.19.1.7 app/code/core/Mage/Catalog/etc/config.xml15-18 and depends on the EAV and core modules.
Catalog Module Structure
Sources:
The Catalog Module manages three primary EAV entities: products, categories, and attributes. Each entity stores its data across multiple tables using the Entity-Attribute-Value pattern for flexibility. Attributes in the catalog extend the base EAV attribute model to include catalog-specific properties like is_global (scope) and is_searchable.
| Entity | Base Table | EAV Entity Type | Key Attributes |
|---|---|---|---|
| Product | catalog_product_entity | catalog_product | SKU, type_id, attribute_set_id, status, visibility |
| Category | catalog_category_entity | catalog_category | name, url_key, is_active, include_in_menu, position |
| Attribute | eav_attribute + catalog_eav_attribute | N/A | attribute_code, frontend_input, is_filterable, is_searchable |
Product Entity Storage
Sources:
The Catalog Module supports multiple product types through a type inheritance hierarchy. Each type is registered in config.xml with its own model, price model, and indexer priority app/code/core/Mage/Catalog/etc/config.xml467-504
Product Type Configuration
| Type | Model | Label | Composite | Index Priority |
|---|---|---|---|---|
simple | catalog/product_type_simple | Simple Product | No | 10 |
virtual | catalog/product_type_virtual | Virtual Product | No | 20 |
configurable | catalog/product_type_configurable | Configurable Product | Yes | 30 |
grouped | catalog/product_type_grouped | Grouped Product | Yes | 50 |
The index_priority value determines the order in which product types are indexed. Lower numbers are indexed first, ensuring simple products (which configurable and grouped products depend on) are processed before composite products.
Sources:
The Catalog Module provides indexers that denormalize EAV data into flat index tables for query performance. These indexers are triggered by product/category changes and run asynchronously.
Catalog Indexers
| Indexer Code | Model | Purpose |
|---|---|---|
catalog_product_attribute | catalog/product_indexer_eav | Indexes filterable attributes for layered navigation |
catalog_product_price | catalog/product_indexer_price | Calculates final prices with rules, tiers, groups |
catalog_url | catalog/indexer_url | Generates SEO-friendly URL rewrites |
catalog_product_flat | catalog/product_indexer_flat | Denormalizes products to flat tables per store |
catalog_category_flat | catalog/category_indexer_flat | Denormalizes categories to flat tables per store |
catalog_category_product | catalog/category_indexer_product | Indexes category-product associations |
Sources:
Product listings on the storefront use a combination of blocks, templates, and collections to render filterable, sortable, paginated product grids and lists. The Mage_Catalog_Model_Resource_Product_Collection handles the primary data retrieval, often joining the price index app/code/core/Mage/Catalog/Model/Api2/Product/Rest.php57-58
Product List Rendering Flow
Sources:
The admin interface for categories has been modernized in Maho with the MahoTree component public/js/maho-tree.js12 This provides a high-performance, draggable category tree used in the CategoryEditForm public/js/mage/adminhtml/catalog/category.js12
Category Management Components
| Component | Code Entity | Purpose |
|---|---|---|
| Tree Logic | MahoTree | Client-side tree rendering with drag-and-drop |
| Form Controller | CategoryEditForm | Orchestrates category editing and AJAX saving |
| Backend Block | Mage_Adminhtml_Block_Catalog_Category_Tree | Prepares category parameters for the JS tree |
| Abstract Block | Mage_Adminhtml_Block_Catalog_Category_Abstract | Handles recursion levels and store-specific tree loading |
Sources:
The Catalog Module exposes extensive configuration options through system.xml, organized into logical groups accessible in the admin panel under System > Configuration > Catalog app/code/core/Mage/Catalog/etc/system.xml20-25
Key Configuration Groups
| Section | Config Path | Purpose |
|---|---|---|
| Frontend | catalog/frontend/* | List modes, pagination, flat catalog, sort options |
| SEO | catalog/seo/* | URL suffixes, canonical tags, redirects |
| Price | catalog/price/scope | Global vs. website pricing |
Sources:
Flat tables are denormalized tables that store complete product/category data in a single table per store. This is currently marked as Deprecated in Maho as modern databases no longer require this optimization app/code/core/Mage/Catalog/etc/system.xml100
Flat Table Structure
| Configuration | Table Pattern | Indexed By |
|---|---|---|
catalog/frontend/flat_catalog_product | catalog_product_flat_{store_id} | catalog_product_flat indexer |
catalog/frontend/flat_catalog_category | catalog_category_flat_{store_id} | catalog_category_flat indexer |
Sources: