File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
app/code/Magento/Reports/Model/ResourceModel/Quote/Item Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 66
77namespace Magento \Reports \Model \ResourceModel \Quote \Item ;
88
9- use Magento \Framework \App \ResourceConnection ;
10-
119/**
1210 * Collection of Magento\Quote\Model\Quote\Item
1311 *
@@ -89,7 +87,6 @@ protected function _construct()
8987 $ this ->_init ('Magento\Quote\Model\Quote\Item ' , 'Magento\Quote\Model\ResourceModel\Quote\Item ' );
9088 }
9189
92-
9390 /**
9491 * Prepare select query for products in carts report
9592 *
@@ -219,8 +216,10 @@ protected function _afterLoad()
219216 $ orderData = $ this ->getOrdersData ($ productIds );
220217 foreach ($ items as $ item ) {
221218 $ 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+ }
224223 $ item ->setOrders (0 );
225224 if (isset ($ orderData [$ item ->getProductId ()])) {
226225 $ item ->setOrders ($ orderData [$ item ->getProductId ()]['orders ' ]);
You can’t perform that action at this time.
0 commit comments