avstudnitz / scopehint2
Displays a hint when a configuration value is overwritten on a lower scope (website or store view).
AvS_ScopeHint for Magento 2
Displays a hint when a configuration value is overwritten on a lower scope (website or store view).
Facts
- extension on GitHub
- direct download link
- Composer key:
avstudnitz/scopehint2(registered at Packagist)
Description
Whenever a configuration setting is overwritten by a lower-level website or store view, an icon is displayed.
Clicking the icon opens an accessible popover grouped by website with the overridden values.
Product Page Builder attributes are supported, with rich content represented as a concise text preview.
See the screenshot to get an impression of what the module does:
[image: Screenshot]
The module also optionally displays the configuration code (which is used for ScopeConfigInterface::getValue()) with the configuration fields.
This is on by default, and can be enabled/disabled in
Stores -> Settings -> Configuration -> Advanced -> Developer -> Debug -> Display path for each option in system configuration
Requirements
- PHP 8.1 through 8.5
Compatibility
- Magento 2.4.x (Open Source and Commerce)
- Compatible with the default backend theme, the Mage-OS M137 admin theme, and the Hyvä commerce admin theme
Installation Instructions
Via Composer:
- Call
composer require avstudnitz/scopehint2in your Magento root dir from the command line
Via Download
- Copy all the files into the newly created directory
app/code/AvS/ScopeHint/in the Magento 2 root.
In both cases:
- Enable the extension by calling
bin/magento module:enable AvS_ScopeHint. - Run
bin/magento setup:upgrade.
Uninstallation
- Uninstall the extension by calling
bin/magento module:uninstall AvS_ScopeHint. - Remove all extension files from
app/code/AvS/ScopeHint/or use Composer to remove the extension if you have installed it with Composer
Support
If you have any issues with this extension, open an issue on GitHub.
Contribution
Any contribution is highly appreciated. The best way to contribute code is to open a pull request on GitHub.
Developer
Andreas von Studnitz
Licence
OSL - Open Software Licence 3.0
Performance
When a category is edited at a non-default store-view scope, the module loads the category once per
store view to check for overridden attribute values. On large setups this can issue many
CategoryRepository::get() calls (one per store per page load of the category edit form).
To prevent excessive load, detection is automatically skipped — and a warning is written to the Magento
system log — when the total number of store views exceeds the configurable threshold.
The threshold is set under:
Stores → Settings → Configuration → Advanced → Developer → Debug → Maximum stores for scope hint detection
(config path dev/debug/scopehint_max_stores, default 50).
Copyright
(c) 2017-2024 Andreas von Studnitz
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
[Unreleased]
Added
Service\ValueFormatter\ParentAwareValueFormatterInterface— optional
extension ofValueFormatterInterfacefor system-config formatters that
describe an override relative to the value it overrides. Field arrays use it
to list the changed rows instead of only the row count.Api\OverrideSourceInterface— extension point for UI-form scope-override
detection. Third-party modules can register custom sources via
AvS\ScopeHint\Service\OverrideSourcePoolinetc/adminhtml/di.xml.
Seedocs/extending.mdfor a worked example.Service\OverrideSourcePool— first-match-wins dispatcher. Sources are
prioritised by their order in the DIsourcesarray.Service\OverrideSource\EavProductOverrideSource— default source covering
real Magento EAV product attributes (extracted from
ProductEavDataProviderPlugin).Service\OverrideSource\EavCategoryOverrideSource— default source covering
real Magento EAV category attributes.Plugin\CategoryDataProviderPlugin— scope-override popovers on the category
edit form, using the sameOverrideSourcePooland legacy-tooltip flag as the
product form.Block\Adminhtml\Eav\Popover+view/adminhtml/templates/eav/popover.phtml
— interactive popover block for EAV UI form fields (mirrors the system-config
popover block from PR 5).view/adminhtml/web/js/popover-bootstrap.js— RequireJS bootstrap that
re-binds[data-scopehint-popover]nodes after Knockout injects HTML into the
DOM (KOhtml=does not triggermage/applyautomatically).- Scope-aware product-grid cells that preserve Magento's native rendering and
add a separately escaped override popover. - Modern system-configuration popovers rendered next to each input, including
support for Magento Backend and Hyvä Commerce admin themes. - Product Page Builder attributes show scope-override popovers with concise,
plain-text content previews instead of escaped Page Builder markup.
Changed
- System configuration override detection loads all website/store-view rows of
core_config_dataonce per request instead of one query per rendered field. - Select, multiselect and
source_modelconfig values resolve to option labels
throughField::getOptions(); serialized-array and editor formatters read the
field definition throughField::getAttribute(). - Product and category form hints compare against the value in the store view
being edited and exclude that store view, as in earlier releases. - Product grid pills show option labels, include store values that have no
default-scope row, and only scan the attributes of the grid's columns. The
static Status and Visibility columns show pills as well. - Serialized-array (field array) config fields show the popover in their value
cell; their renderers never outputafter_element_html. Plugin\ProductEavDataProviderPlugin— slim; delegates override detection to
OverrideSourcePool, renders popover into the field'sadditionalInfometa
slot. Legacy<br>-list tooltip intooltip.descriptionpreserved behind the
dev/debug/scopehint_legacy_tooltipconfig flag.- System configuration detection now reads explicit
core_config_datarows,
so inherited website values are not misreported as store-view overrides. - Product grid aggregation uses Magento's metadata link field and therefore
supports both Open Source (entity_id) and Commerce (row_id) schemas. - Category fields resolve their real EAV attribute scope before enabling hints.
- Datetime formatting retains the time component for
datetimeandtime
fields. Popovers bind after asynchronous rendering and close on Escape.
Breaking Changes
Plugin\ProductEavDataProviderPluginconstructor changed. Previous
constructor acceptedStoreManagerInterface,Registry, and
ProductRepositoryInterface. New constructor acceptsOverrideSourcePool,
LayoutInterface,ScopeConfigInterface,Registry, andEscaper. These are private
plugin classes with no public API contract; no deprecated alias is provided.Plugin\ConfigFieldPluginpublic constants removed.SCOPE_TYPE_WEBSITES
andSCOPE_TYPE_STORESno longer exist on the plugin; use
Api\Data\ScopeOverrideInterface::SCOPE_TYPE_WEBSITES/SCOPE_TYPE_STORES
(same values).Plugin\ConfigFieldPluginconstructor changed. Previous constructor
acceptedEscaper,ScopeConfigInterface,WebsiteRepositoryInterface,
StoreRepositoryInterface, andRequestInterface. New constructor accepts
ScopeConfigInterfaceandService\ScopeOverrideDetectorInterface.- PHP 7.4 support dropped. The module now requires PHP 8.1 or later.
If you have overridden one of these plugin classes via <preference> in your DI
configuration, update your constructor accordingly.
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 2.0.0 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-10-23 10:57:06 |
| 1.3.5 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-07-13 05:46:19 |
| 1.3.4 | stable | Fail | Not yet tested Details | 2025-05-05 07:28:52 |
| 1.3.3 | stable | Not tested | Not yet tested Details | 2025-03-10 09:47:23 |
| 1.3.2 | stable | Not tested | Not yet tested Details | 2025-01-27 12:55:38 |
| 1.3.1 | stable | Not tested | Not yet tested Details | 2025-01-15 14:39:07 |
| 1.3.0 | stable | Not tested | Not yet tested Details | 2024-11-28 11:18:19 |
| 1.2.4 | stable | Not tested | Not yet tested Details | 2024-11-28 11:12:56 |
| 1.2.3 | stable | Not tested | Not yet tested Details | 2024-11-26 09:53:49 |
| 1.2.2 | stable | Not tested | Not yet tested Details | 2023-04-06 08:58:48 |
| 1.2.1 | stable | Not tested | Not yet tested Details | 2022-11-07 10:40:39 |
| 1.2.0 | stable | Not tested | Not yet tested Details | 2022-10-17 09:26:43 |
| 1.1.5 | stable | Not tested | Not yet tested Details | 2022-01-14 07:11:55 |
| 1.1.4 | stable | Not tested | Not yet tested Details | 2020-07-30 06:29:43 |
| 1.1.3 | stable | Not tested | Not yet tested Details | 2019-10-18 08:19:12 |
| 1.1.2 | stable | Not tested | Not yet tested Details | 2019-08-19 11:28:50 |
| 1.1.1 | stable | Not tested | Not yet tested Details | 2019-01-25 12:26:40 |
| 1.1.0 | stable | Not tested | Not yet tested Details | 2019-01-22 15:43:31 |
| 1.0.3 | stable | Not tested | Not yet tested Details | 2019-01-07 14:52:33 |
| 1.0.4 | stable | Not tested | Not yet tested Details | 2019-01-07 14:51:13 |
| 1.0.2 | stable | Not tested | Not yet tested Details | 2018-11-20 16:00:02 |
| 1.0.1 | stable | Not tested | Not yet tested Details | 2017-10-20 09:45:22 |
| 1.0.0-beta.1 | beta | Not tested | Not yet tested Details | 2017-03-03 14:27:42 |
Requires 7
| Package | Constraint |
|---|---|
| magento/framework | ~103.0 |
| magento/module-backend | ~102.0 |
| magento/module-catalog | ~104.0 |
| magento/module-config | ~101.2 |
| magento/module-store | ~101.1 |
| magento/module-ui | ~101.2 |
| php | ^8.1 |
Requires-dev 3
| Package | Constraint |
|---|---|
| magento/magento-coding-standard | * |
| phpstan/phpstan | ^1.10 |
| phpunit/phpunit | ^9.5 |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. A phpcs finding can't make a module incompatible.
Static analysis
Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.
| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 97 | 15 errors, 82 warnings (ruleset: Magento2), 29 auto-fixable with phpcbf |
| PHPMD | Warning | 42 | 42 rule violations (UnusedFormalParameter:16, MissingImport:12, TooManyPublicMethods:6, NPathComplexity:3, CyclomaticComplexity:2) |
| Cpd | Warning | 2 | 2 duplicated chunks spanning 51 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Pass | 0 |
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
Security
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
More from avstudnitz
View vendorTurn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.