File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
app/code/Magento/Catalog/Model/ResourceModel/Product
dev/tests/integration/testsuite/Magento/CatalogWidget/Block/Product Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1060,14 +1060,15 @@ public function getAllAttributeValues($attribute)
1060
1060
$ select = clone $ this ->getSelect ();
1061
1061
$ attribute = $ this ->getEntity ()->getAttribute ($ attribute );
1062
1062
1063
- $ aiField = $ this ->getConnection ()->getAutoIncrementField ($ this ->getMainTable ());
1063
+ $ fieldMainTable = $ this ->getConnection ()->getAutoIncrementField ($ this ->getMainTable ());
1064
+ $ fieldJoinTable = $ attribute ->getEntity ()->getLinkField ();
1064
1065
$ select ->reset ()
1065
1066
->from (
1066
1067
['cpe ' => $ this ->getMainTable ()],
1067
1068
['entity_id ' ]
1068
1069
)->join (
1069
1070
['cpa ' => $ attribute ->getBackend ()->getTable ()],
1070
- 'cpe. ' . $ aiField . ' = cpa. ' . $ aiField ,
1071
+ 'cpe. ' . $ fieldMainTable . ' = cpa. ' . $ fieldJoinTable ,
1071
1072
['store_id ' , 'value ' ]
1072
1073
)->where ('attribute_id = ? ' , (int )$ attribute ->getId ());
1073
1074
Original file line number Diff line number Diff line change @@ -115,6 +115,9 @@ public function testCreateCollectionWithDropdownAttributeStoreScope()
115
115
. $ dropdownAttributeOptionIds [1 ] . '`^]^] ' ;
116
116
$ this ->block ->setData ('conditions_encoded ' , $ encodedConditions );
117
117
$ this ->performAssertions (2 );
118
+ $ attribute ->setUsedInProductListing (0 );
119
+ $ attribute ->save ();
120
+ $ this ->performAssertions (2 );
118
121
}
119
122
120
123
/**
You can’t perform that action at this time.
0 commit comments