diff --git a/vendor/magento/module-catalog/Ui/DataProvider/Product/ProductCollection.php b/vendor/magento/module-catalog/Ui/DataProvider/Product/ProductCollection.php index 298595b3d0f..f4334bc25ef 100644 --- a/vendor/magento/module-catalog/Ui/DataProvider/Product/ProductCollection.php +++ b/vendor/magento/module-catalog/Ui/DataProvider/Product/ProductCollection.php @@ -25,58 +25,4 @@ class ProductCollection extends \Magento\Catalog\Model\ResourceModel\Product\Col $this->_productLimitationFilters->setUsePriceIndex(false); return $this->_productLimitationPrice(true); } - - /** - * Return approximately amount if too much entities. - * - * @return int|mixed - */ - public function getSize() - { - $sql = $this->getSelectCountSql(); - $possibleCount = $this->analyzeCount($sql); - - if ($possibleCount > 20000) { - return $possibleCount; - } - - return parent::getSize(); - } - - /** - * Analyze amount of entities in DB. - * - * @param $sql - * @return int|mixed - * @throws \Zend_Db_Statement_Exception - */ - private function analyzeCount($sql) - { - $results = $this->getConnection()->query('EXPLAIN ' . $sql)->fetchAll(); - $alias = $this->getMainTableAlias(); - - foreach ($results as $result) { - if ($result['table'] == $alias) { - return $result['rows']; - } - } - - return 0; - } - - /** - * Identify main table alias or its name if alias is not defined. - * - * @return string - * @throws \LogicException - */ - private function getMainTableAlias() - { - foreach ($this->getSelect()->getPart(\Magento\Framework\DB\Select::FROM) as $tableAlias => $tableMetadata) { - if ($tableMetadata['joinType'] == 'from') { - return $tableAlias; - } - } - throw new \LogicException("Main table cannot be identified."); - } } diff --git a/vendor/magento/module-sales/etc/adminhtml/di.xml b/vendor/magento/module-sales/etc/adminhtml/di.xml index e221467dbcf..35ef510d277 100644 --- a/vendor/magento/module-sales/etc/adminhtml/di.xml +++ b/vendor/magento/module-sales/etc/adminhtml/di.xml @@ -48,9 +48,4 @@ - - - \Magento\Catalog\Ui\DataProvider\Product\ProductCollectionFactory - - diff --git a/vendor/magento/module-sales-rule/view/adminhtml/ui_component/sales_rule_form.xml b/vendor/magento/module-sales-rule/view/adminhtml/ui_component/sales_rule_form.xml index 7afbf197cf6..a9e9e58563c 100644 --- a/vendor/magento/module-sales-rule/view/adminhtml/ui_component/sales_rule_form.xml +++ b/vendor/magento/module-sales-rule/view/adminhtml/ui_component/sales_rule_form.xml @@ -493,7 +493,7 @@ - 0 + 1 sales_rule