I have recently gone through magento's core ScopeInterface file which is located in Magento\Store\Model.

enter image description here

My question is why magento define SCOPE_STORES & SCOPE_STORE similar as WEBSITE and for GROUP.

Whenever i want to get data with scopeConfig how can i get (means if i want website data then SCOPE_WEBSITE or SCOPE_WEBSITES, which constant i have to use) ?


1 Answer 1


They do the same thing, if you check the following class:


The following code is pretty self-explanatory:

if ($scope === 'store') {
    $scope = 'stores';
} elseif ($scope === 'website') {
    $scope = 'websites';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.