Why is a magento 2 site in single store mode still exporting products from global and store view stores?
These products were initially migrated using the data-migration-tool
from magento 1
This is normal behavior.
Single store mode can be enabled if you only have 1 store view.
And this is a way to remove some store selection fields from different admin screens.
If you have 2 or more store views, the setting "single store mode" is ignored.
The result of the single store mode is determined in Magento\Store\Model\StoreManager::isSingleStoreMode
.
the method looks like this:
public function isSingleStoreMode()
{
return $this->isSingleStoreModeEnabled() && $this->hasSingleStore();
}
where isSingleStoreModeEnabled
checks the config setting and hasSingleStore
checks count($this->getStores(true)) < 3
.
Why 3?
Because the admin is considered a store. So this only works if you have one frontend store view and one admin store view.
summing up, in your case isSingleStoreMode
will return true & false
which evaluates to false
.
$this->isSingleStoreModeEnabled()
: true $this->hasSingleStore()
: true