File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \Catalog \Ui \DataProvider \Product ;
7
+
8
+ /**
9
+ * Collection which is used for rendering product list in the backend.
10
+ *
11
+ * Used for product grid and customizes behavior of the default Product collection for grid needs.
12
+ */
13
+ class ProductCollection extends \Magento \Catalog \Model \ResourceModel \Product \Collection
14
+ {
15
+ /**
16
+ * Disables using of price index for grid rendering
17
+ *
18
+ * Admin area shouldn't use price index and should rely on actual product data instead.
19
+ *
20
+ * @codeCoverageIgnore
21
+ * @return \Magento\Catalog\Model\ResourceModel\Product\Collection
22
+ */
23
+ protected function _productLimitationJoinPrice ()
24
+ {
25
+ $ this ->_productLimitationFilters ->setUsePriceIndex (false );
26
+ return $ this ->_productLimitationPrice (true );
27
+ }
28
+ }
Original file line number Diff line number Diff line change 78
78
<type name =" Magento\Catalog\Model\ResourceModel\Attribute" >
79
79
<plugin name =" invalidate_pagecache_after_attribute_save" type =" Magento\Catalog\Plugin\Model\ResourceModel\Attribute\Save" />
80
80
</type >
81
+ <virtualType name =" \Magento\Catalog\Ui\DataProvider\Product\ProductCollectionFactory" type =" \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory" >
82
+ <arguments >
83
+ <argument name =" instanceName" xsi : type =" string" >\Magento\Catalog\Ui\DataProvider\Product\ProductCollection</argument >
84
+ </arguments >
85
+ </virtualType >
81
86
<type name =" Magento\Catalog\Ui\DataProvider\Product\ProductDataProvider" >
82
87
<arguments >
83
88
<argument name =" addFieldStrategies" xsi : type =" array" >
86
91
<argument name =" addFilterStrategies" xsi : type =" array" >
87
92
<item name =" store_id" xsi : type =" object" >Magento\Catalog\Ui\DataProvider\Product\AddStoreFieldToCollection</item >
88
93
</argument >
94
+ <argument name =" collectionFactory" xsi : type =" object" >\Magento\Catalog\Ui\DataProvider\Product\ProductCollectionFactory</argument >
89
95
</arguments >
90
96
</type >
91
97
<type name =" Magento\Catalog\Model\Product\Action" >
You can’t perform that action at this time.
0 commit comments