Skip to content

Commit

Permalink
[bug-OpenMage#1034] getAttributeRawValue() returns wrong values when …
Browse files Browse the repository at this point in the history
…called for multiple attributes and non-admin store

If some attributes don't have a value for the requested store view values
from other attributes are returned.
  • Loading branch information
midlan authored and edannenberg committed Aug 20, 2020
1 parent 96043c7 commit 17ce3be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/core/Mage/Catalog/Model/Resource/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ public function getAttributeRawValue($entityId, $attribute, $store)
$valueExpr = $adapter->getCheckSql('store_value.value IS NULL',
'default_value.value', 'store_value.value');
$joinCondition = array(
$adapter->quoteInto('store_value.attribute_id IN (?)', array_keys($_attributes)),
'store_value.attribute_id = default_value.attribute_id',
'store_value.entity_type_id = :entity_type_id',
'store_value.entity_id = :entity_id',
'store_value.store_id = :store_id',
Expand Down

0 comments on commit 17ce3be

Please sign in to comment.