File tree 1 file changed +4
-5
lines changed
app/code/Magento/Reports/Model/ResourceModel/Quote/Item 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 6
6
7
7
namespace Magento \Reports \Model \ResourceModel \Quote \Item ;
8
8
9
- use Magento \Framework \App \ResourceConnection ;
10
-
11
9
/**
12
10
* Collection of Magento\Quote\Model\Quote\Item
13
11
*
@@ -89,7 +87,6 @@ protected function _construct()
89
87
$ this ->_init ('Magento\Quote\Model\Quote\Item ' , 'Magento\Quote\Model\ResourceModel\Quote\Item ' );
90
88
}
91
89
92
-
93
90
/**
94
91
* Prepare select query for products in carts report
95
92
*
@@ -219,8 +216,10 @@ protected function _afterLoad()
219
216
$ orderData = $ this ->getOrdersData ($ productIds );
220
217
foreach ($ items as $ item ) {
221
218
$ item ->setId ($ item ->getProductId ());
222
- $ item ->setPrice ($ productData [$ item ->getProductId ()]['price ' ] * $ item ->getBaseToGlobalRate ());
223
- $ item ->setName ($ productData [$ item ->getProductId ()]['name ' ]);
219
+ if (isset ($ productData [$ item ->getProductId ()])) {
220
+ $ item ->setPrice ($ productData [$ item ->getProductId ()]['price ' ] * $ item ->getBaseToGlobalRate ());
221
+ $ item ->setName ($ productData [$ item ->getProductId ()]['name ' ]);
222
+ }
224
223
$ item ->setOrders (0 );
225
224
if (isset ($ orderData [$ item ->getProductId ()])) {
226
225
$ item ->setOrders ($ orderData [$ item ->getProductId ()]['orders ' ]);
You can’t perform that action at this time.
0 commit comments