1

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

Store View Export example

1 Answer 1

2

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.

4
  • 1
    $this->isSingleStoreModeEnabled(): true $this->hasSingleStore(): true
    – tread
    Commented Jun 27, 2017 at 14:13
  • Really? This is strange then
    – Marius
    Commented Jun 27, 2017 at 14:15
  • Yes, I think this is maybe an issue that was brought over from the previous magento store which had products duplicating for both the global and store view scope.
    – tread
    Commented Jun 27, 2017 at 14:18
  • Or maybe that's how the export works.
    – Marius
    Commented Jun 27, 2017 at 15:14

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.