diff --git a/app/code/Magento/Catalog/Helper/Product/ProductList.php b/app/code/Magento/Catalog/Helper/Product/ProductList.php index 9f976654d9676..e2dae91477599 100644 --- a/app/code/Magento/Catalog/Helper/Product/ProductList.php +++ b/app/code/Magento/Catalog/Helper/Product/ProductList.php @@ -126,12 +126,15 @@ public function getAvailableLimit($viewMode): array if (!isset($availableViewModes[$viewMode])) { return $this->_defaultAvailableLimit; } - + $scope=ScopeInterface::SCOPE_STORE; + if($this->scopeConfig->getValue('general/single_store_mode/enabled', ScopeConfigInterface::SCOPE_TYPE_DEFAULT)) { + $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT; + } $perPageConfigPath = 'catalog/frontend/' . $viewMode . '_per_page_values'; - $perPageValues = (string)$this->scopeConfig->getValue($perPageConfigPath, ScopeInterface::SCOPE_STORE); + $perPageValues = (string)$this->scopeConfig->getValue($perPageConfigPath, $scope); $perPageValues = explode(',', $perPageValues); $perPageValues = array_combine($perPageValues, $perPageValues); - if ($this->scopeConfig->isSetFlag('catalog/frontend/list_allow_all', ScopeInterface::SCOPE_STORE)) { + if ($this->scopeConfig->isSetFlag('catalog/frontend/list_allow_all', $scope)) { return ($perPageValues + ['all' => __('All')]); } else { return $perPageValues;