Overview
Much or a Magento installation's data is organized using four nested container levels, sometimes referred to as the "G-W-S" model, or more completely, GWSSv: Global, Website, Store, and Store View.
These four containers play two roles:
- They have some direct attributes of their own
- They provide "scopes" for other attribute settings. A large number of attributes belonging to other objects (such as attributes of Products) can be set at some higher level (say Global), and overridden (customized) at a lower, more-specific scope level.
The containers/scope-levels have names suggestive of the business purposes they perhaps serve. However:
- The "Website" notion is a bit vague, and confusion arises from:
- a single Magento installation can have multiple of these (so what is this bigger multiple-website thing?) and
- a Store might well be distinguished by theme and domain name, which to users would seem to be a separate website
- The attributes that can or can't be set at the Store level seem particularly surprising.
So to learn how one might really apply these different levels of containership and configuration scope, it's necessary to know more about what attributes/configuration can and cannot be set at each level.
Background
The distinct character of each level, and the distinctions that can be applied to the members at each level, presumably accommodate particular business requirements.
Only a few aspects of Magento configuration correspond to direct attributes of the individual G, W, S, Sv objects (some are shown in the chart below).
Container
|
Use suggested by container's name
|
Direct attributes of members at each level
|
Global
|
|
- System-wide settings.
- Management of overall software.
- Users
- Pool of all Products
|
Websites
|
Business entity
|
- Default Store
- Customer accounts
|
Stores
|
Directed at particular audience interest
|
|
Store views
|
Separate by languages or region
|
|
Most configuration corresponds to settings of other objects (such as products) that can be set at any of several levels, with lower-level settings overriding ("customizing") the higher-level settings
On this page, I refer to these levels as scope levels.
Suppose that a value is set for some attribute (say the Price attribute of a particular Product), for a particular web site, say WebsiteA. Then the scope of that setting is WebsiteA, while the scope level of that setting is website.
Scopes vs Settings
This table shows the configuration aspects that can be set at multiple scope levels.
Config item
|
"System Value"
| Global "Default Config"
|
Website
|
Store
|
Store View
|
Comments
|
Product in Websites (availability)
|
|
|
Multi select
|
|
|
(For overall availability, also set Categories appropriately, and product's Enable attribute.)
|
Product Attribute specs
|
| X
|
|
|
|
|
Product Attribute values
|
| X
|
X
|
|
X
|
1. Any particular attribute seems to be limited to just global and one of website or store view, because... 2. In individual Product config page, website-scopeable attributes have to be set using store-view scope. (No website scope is offered on the scope control.) 3. Why no Store-level control of attributes like Enable or Price?
|
|
|
|
|
|
|
|
Categories |
| X
|
|
|
|
Hierarchy set globally
|
Category association with GWSSv
|
|
|
| X
|
| Each Store must select a top-level ("root") category, which controls that store's navigation menus.
|
Category attribute values
|
| X
|
|
| X
|
|
Products in Category
|
| X
|
| "X"
|
| Global setting associates each product with zero, one or more nodes in the Category tree. Since each Store can have its own root category, that means that product association to Categories can be effectively per-store.
|
|
|
|
|
|
|
|
Catalog and Cart pricing rules
|
|
| Multi select
|
|
|
|
|
|
|
|
|
|
|
Many "Store" > Configuration variables
| X
| X
| X
|
| X
| The variables with Store View scope can be set at any or all of the three indicated levels (below "System")
|
|
|
|
|
|
|
|
Page in Websites
|
| X
|
|
| Multi select | Clearly the meaning of this setting is NOT Page in Websites! Also, the UI control for this flips the meaning of light-bold font relative to the available/not available
|
Block > "Store View"
|
| X
|
|
| Multi select
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Notes:
- In addition to the GWSSv scope levels, for some configuration items there's also a "System" level -- presumably built in to the software (or at least in supplied config files?)
Other notes
The shift-click multi-select control is hazardous
- For a number of scope settings, the scope setting control offers multiple select using shift-click. Single click deselects all existing settings, making this an extremely error prone way of capturing and editing such settings. The default sizing of these controls, which reveals only a small part of the
overall tree of GWSSv (not even two Website-Store-View items) increases the likelihood of mistakenly deselecting existing settings. By comparison, the checkbox-equipped treeview control used for Products in Category invites unwanted changes far less.
UI terms for 'global' are confusingly inconsistent
- On Product config pages:
- Scope control: "All Store Views" (This label seems to make a point to not say global, though I think that's what it means)
- Attribute scope indicator positioned beside attributes: "[global]"
- Stores Config pages
- Scope control: "Default Config" means the global config NOT the system config
- Attribute scope indicator beside attributes: "[global]"
- The checkbox to use inherited value (value from enclosing scope):
- When scope control is set to Default Config, the checkbox is called "Use system value" (accurate, assuming you know there's a built-in system value).
- When scope control is set to a Website: Checkbox says "Use Default" (which means global)
- When scope control is set to a Store View: Checkbox says "Use Website"
Curious aspect of "codes"
In GWSSv, the UI exposes codes for
Website and Store Views (plus of course 'global'), but no code for
Stores. This might be a quirk of the UI, or it may indicate
non-uniformity in the underlying model, in turn revealing some rationale
for the different scope levels.