Skip to content

Commit 65b1f1e

Browse files
merge magento/2.2-develop into magento-obsessive-owls/MC-16624
2 parents c6fa5b1 + a3c9082 commit 65b1f1e

File tree

25 files changed

+463
-203
lines changed

25 files changed

+463
-203
lines changed

app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="LoginAsAdmin">
1212
<arguments>
13-
<argument name="adminUser" defaultValue="_ENV"/>
13+
<argument name="adminUser" defaultValue="DefaultAdminUser"/>
1414
</arguments>
1515
<amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/>
16-
<fillField selector="{{AdminLoginFormSection.username}}" userInput="{{adminUser.MAGENTO_ADMIN_USERNAME}}" stepKey="fillUsername"/>
17-
<fillField selector="{{AdminLoginFormSection.password}}" userInput="{{adminUser.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillPassword"/>
16+
<fillField selector="{{AdminLoginFormSection.username}}" userInput="{{adminUser.username}}" stepKey="fillUsername"/>
17+
<fillField selector="{{AdminLoginFormSection.password}}" userInput="{{adminUser.password}}" stepKey="fillPassword"/>
1818
<click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/>
1919
<closeAdminNotification stepKey="closeAdminNotification"/>
2020
</actionGroup>

app/code/Magento/Catalog/Model/Indexer/Product/Flat/TableBuilder.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,16 @@ protected function _fillTemporaryTable(
289289

290290
/** @var $attribute \Magento\Catalog\Model\ResourceModel\Eav\Attribute */
291291
foreach ($columnsList as $columnName => $attribute) {
292-
$countTableName = 't' . $iterationNum++;
292+
$countTableName = 't' . ($iterationNum++);
293293
$joinCondition = sprintf(
294-
'e.%3$s = %1$s.%3$s AND %1$s.attribute_id = %2$d AND %1$s.store_id = 0',
294+
'e.%3$s = %1$s.%3$s' .
295+
' AND %1$s.attribute_id = %2$d' .
296+
' AND (%1$s.store_id = %4$d' .
297+
' OR %1$s.store_id = 0)',
295298
$countTableName,
296299
$attribute->getId(),
297-
$metadata->getLinkField()
300+
$metadata->getLinkField(),
301+
$storeId
298302
);
299303

300304
$select->joinLeft(
@@ -308,9 +312,10 @@ protected function _fillTemporaryTable(
308312
$columnValueName = $attributeCode . $valueFieldSuffix;
309313
if (isset($flatColumns[$columnValueName])) {
310314
$valueJoinCondition = sprintf(
311-
'e.%1$s = %2$s.option_id AND %2$s.store_id = 0',
315+
'e.%1$s = %2$s.option_id AND (%2$s.store_id = %3$d OR %2$s.store_id = 0)',
312316
$attributeCode,
313-
$countTableName
317+
$countTableName,
318+
$storeId
314319
);
315320
$selectValue->joinLeft(
316321
[

app/code/Magento/Catalog/Model/ResourceModel/Product/Indexer/Price/Query/BaseFinalPrice.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,8 @@ public function getQuery(array $dimensions, string $productType, array $entityId
217217
$select->where("e.type_id = ?", $productType);
218218

219219
if ($entityIds !== null) {
220-
if (count($entityIds) > 1) {
221-
$select->where(sprintf('e.entity_id BETWEEN %s AND %s', min($entityIds), max($entityIds)));
222-
} else {
223-
$select->where('e.entity_id = ?', $entityIds);
224-
}
220+
$select->where(sprintf('e.entity_id BETWEEN %s AND %s', min($entityIds), max($entityIds)));
221+
$select->where('e.entity_id IN(?)', $entityIds);
225222
}
226223

227224
/**

0 commit comments

Comments
 (0)