From dc5f8bcf8e37b50930c16a466c93f6688cd0aa3f Mon Sep 17 00:00:00 2001 From: KrasnoshchokBohdan Date: Fri, 9 Jan 2026 11:30:15 +0200 Subject: [PATCH] magento/magento2#40218: Unable to get product collection scoped decimal attribute if price is globally scoped Removed loop forcing default store ID for all attributes when price is selected. --- .../ResourceModel/Collection/AbstractCollection.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php b/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php index da4f5344bb667..2a722ca59600e 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php @@ -166,18 +166,6 @@ protected function _getLoadAttributesSelect($table, $attributeIds = []) $entityIdField = $indexList[$connection->getPrimaryKeyName($entityTable)]['COLUMNS_LIST'][0]; if ($storeId) { - - foreach ($attributeIds as $id) { - $attribute = $this->_eavConfig->getAttribute( - $this->getEntity()->getType(), - $id - ); - - if ($attribute->getAttributeCode() === 'price' && (int)$attribute->getIsGlobal() === 1) { - $storeId = $this->getDefaultStoreId(); - } - } - $joinCondition = [ 't_s.attribute_id = t_d.attribute_id', "t_s.{$entityIdField} = t_d.{$entityIdField}",