Skip to content

Commit 22d15fd

Browse files
committed
PB-229: Story Bug for PB-107: Incorrect Number of Products
1 parent 584e5b9 commit 22d15fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/PageBuilder/Controller/Adminhtml/Form/Element/ProductTotals.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ public function execute()
143143
{
144144
/** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $collection */
145145
$collection = $this->createCollection();
146-
$this->stockFilter->addInStockFilterToCollection($collection);
147146
$collection->getSelect()->joinLeft(
148147
['super_link_table' => $collection->getTable('catalog_product_super_link')],
149148
'super_link_table.product_id = e.entity_id',
@@ -161,6 +160,7 @@ public function execute()
161160
// Only display enabled products in totals count
162161
$collection->addAttributeToFilter('status', Status::STATUS_ENABLED);
163162
$collection->setVisibility(Visibility::VISIBILITY_BOTH);
163+
$this->stockFilter->addIsInStockFilterToCollection($collection);
164164

165165
return $this->jsonFactory->create()
166166
->setData(

0 commit comments

Comments
 (0)