Skip to content

Commit e65498a

Browse files
author
Joan He
committed
Merge remote-tracking branch 'trigger/MC-5535' into BugFixPR
2 parents c324ae6 + 9a58ec5 commit e65498a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,7 @@ public function loadProductCount($items, $countRegular = true, $countAnchor = tr
322322
['e' => $this->getTable('catalog_category_entity')],
323323
'main_table.category_id=e.entity_id',
324324
[]
325-
)->where(
326-
'e.entity_id = :entity_id'
327-
)->orWhere(
328-
'e.path LIKE :c_path'
329-
);
325+
)->where('e.entity_id = :entity_id OR e.path LIKE :c_path');
330326
if ($websiteId) {
331327
$select->join(
332328
['w' => $this->getProductWebsiteTable()],

app/code/Magento/Catalog/Test/Mftf/Test/AdminFilteringCategoryProductsUsingScopeSelectorTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
userInput="$$createProduct1.name$$" stepKey="seeProductName4"/>
141141
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct12.name$$)}}"
142142
userInput="$$createProduct12.name$$" stepKey="seeProductName5"/>
143+
<waitForText userInput="$$createCategory.name$$ (2)" stepKey="seeCorrectProductCount"/>
143144
<dontSee selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct0.name$$)}}"
144145
userInput="$$createProduct0.name$$" stepKey="dontSeeProductName"/>
145146
<dontSee selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct2.name$$)}}"
@@ -164,6 +165,7 @@
164165
userInput="$$createProduct2.name$$" stepKey="seeProductName6"/>
165166
<see selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct12.name$$)}}"
166167
userInput="$$createProduct12.name$$" stepKey="seeProductName7"/>
168+
<waitForText userInput="$$createCategory.name$$ (2)" stepKey="seeCorrectProductCount2"/>
167169
<dontSee selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct0.name$$)}}"
168170
userInput="$$createProduct0.name$$" stepKey="dontSeeProductName2"/>
169171
<dontSee selector="{{AdminCategoryProductsGridSection.productGridNameProduct($$createProduct2.name$$)}}"

0 commit comments

Comments
 (0)