215
PHP Files
13
API Interfaces
99
Model Classes
3
DB Tables
4
REST Endpoints
25+
DI Preferences

Module Overview

The Magento_Store module is a foundational module that manages the multi-store hierarchy consisting of Websites, Store Groups (Stores), and Store Views. This three-tier structure enables Magento to power complex multi-brand, multi-region, and multi-language ecommerce operations from a single installation.

As a zero-dependency foundational module, nearly every other Magento module depends on Magento_Store for scope configuration, currency/locale resolution, and URL generation. The module provides the StoreManagerInterface - one of the most frequently injected services across the entire platform.

Key responsibilities include: store resolution from URL/cookie/request parameters, scope-based configuration retrieval, single-store mode detection, and the complete repository pattern for managing store entities.

Key Components

StoreManagerInterface
Central service for store/website/group access. Most injected interface in Magento.
StoreResolver
Resolves current store from URL path, GET params, or cookies.
ScopeInterface
Defines scope type constants: SCOPE_STORE, SCOPE_WEBSITE, SCOPE_GROUP.
StoreRepository
CRUD operations for store views with caching and active store filtering.
WebsiteRepository
CRUD operations for websites including default website resolution.
GroupRepository
CRUD operations for store groups with root category assignment.
StoreCookieManager
Manages store code persistence in cookies for store switching.
StoreConfigManager
Retrieves store configuration data for REST API responses.
App\Config\Source\RuntimeConfigSource
Runtime configuration source for dynamic store config values.

REST API Endpoints

Method Endpoint Service Interface Description
GET /V1/store/storeViews StoreRepositoryInterface::getList List all store views
GET /V1/store/storeGroups GroupRepositoryInterface::getList List all store groups
GET /V1/store/websites WebsiteRepositoryInterface::getList List all websites
GET /V1/store/storeConfigs StoreConfigManagerInterface::getStoreConfigs Get store configuration data

Database Tables

store_website
Top-level entity. Fields: website_id, code, name, sort_order, default_group_id, is_default.
store_group
Middle tier (Store). Fields: group_id, website_id (FK), name, root_category_id, default_store_id, code.
store
Lowest tier (Store View). Fields: store_id, code, website_id (FK), group_id (FK), name, sort_order, is_active.