diff --git a/app/code/core/Mage/Catalog/Model/Resource/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Abstract.php index 5cb83e89015..6053b28d38e 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Abstract.php @@ -635,12 +635,13 @@ public function getAttributeRawValue($entityId, $attribute, $store) /** * Collecting typed attributes, performing separate SQL query for each attribute type table */ - if ($store instanceof Mage_Core_Model_Store) { - $store = $store->getId(); - } - - $store = (int)$store; if ($typedAttributes) { + if ($store instanceof Mage_Core_Model_Store) { + $store = $store->getId(); + } + + $store = (int)$store; + foreach ($typedAttributes as $table => $_attributes) { $select = $adapter->select() ->from(array('default_value' => $table), array('attribute_id'))