Skip to content

Commit d8315da

Browse files
committed
PB-229: Story Bug for PB-107: Incorrect Number of Products
1 parent 4380645 commit d8315da

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,15 @@ public function execute()
136136
/** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $collection */
137137
$collection = $this->createCollection();
138138
$collection->getSelect()->joinLeft(
139-
['link_table' => $collection->getTable('catalog_product_super_link')],
139+
['super_link_table' => $collection->getTable('catalog_product_super_link')],
140+
'super_link_table.product_id = e.entity_id',
141+
['product_id']
142+
)->joinLeft(
143+
['link_table' => $collection->getTable('catalog_product_link')],
140144
'link_table.product_id = e.entity_id',
141145
['product_id']
142-
)->where('link_table.product_id IS NULL');
146+
)->where('link_table.product_id IS NULL and super_link_table.product_id IS NULL');
147+
143148
$totalProducts = $collection->getSize();
144149
$disabledProducts = $collection
145150
->addAttributeToFilter('status', Status::STATUS_DISABLED)

0 commit comments

Comments
 (0)