Skip to content

Commit 21b6073

Browse files
committed
PB-107: Display total number of products matched into ProductsList
- populate total number of products
1 parent 0cae3eb commit 21b6073

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,9 @@ public function execute()
135135
{
136136
/** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $collection */
137137
$collection = $this->createCollection();
138-
$totalProducts = $collection->load()->getSize();
138+
$totalProducts = $collection->getSize();
139139
$disabledProducts = $collection
140140
->addAttributeToFilter('status', Status::STATUS_DISABLED)
141-
->load()
142141
->getSize();
143142

144143
return $this->jsonFactory->create()

app/code/Magento/PageBuilder/view/adminhtml/web/js/form/element/product-totals.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ define([
7474
}.bind(this)
7575
).fail(function () {
7676
this.value($t("An unknown error occurred. Please try again."));
77-
});
77+
}.bind(this));
7878
}, 10),
7979
});
8080
});

0 commit comments

Comments
 (0)