Skip to content

Commit 4da40b1

Browse files
mattdavenportfballianocolinmollenhour
authored
Ensure store-scoped values are selected before default (#2966)
Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com> Co-authored-by: Colin Mollenhour <colin@mollenhour.com>
1 parent d39d289 commit 4da40b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/code/core/Mage/Catalog/Model/Resource/Abstract.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ protected function _getLoadAttributesSelect($object, $table)
117117
->from(['attr_table' => $table], [])
118118
->where("attr_table.{$this->getEntityIdField()} = ?", $object->getId())
119119
->where('attr_table.store_id IN (?)', $storeIds);
120+
if (count($storeIds) > 1) {
121+
$select->order('attr_table.store_id ASC');
122+
}
120123
if ($setId) {
121124
$select->join(
122125
['set_table' => $this->getTable('eav/entity_attribute')],

0 commit comments

Comments
 (0)