Skip to content

Commit ee37eb3

Browse files
authored
Update Collection.php
1 parent 0c0393d commit ee37eb3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Reports/Model/ResourceModel/Quote/Item/Collection.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,10 @@ protected function _afterLoad()
220220
$orderData = $this->getOrdersData($productIds);
221221
foreach ($items as $item) {
222222
$item->setId($item->getProductId());
223-
$item->setPrice($productData[$item->getProductId()]['price'] * $item->getBaseToGlobalRate());
224-
$item->setName($productData[$item->getProductId()]['name']);
223+
if (isset($productData[$item->getProductId()])) {
224+
$item->setPrice($productData[$item->getProductId()]['price'] * $item->getBaseToGlobalRate());
225+
$item->setName($productData[$item->getProductId()]['name']);
226+
}
225227
$item->setOrders(0);
226228
if (isset($orderData[$item->getProductId()])) {
227229
$item->setOrders($orderData[$item->getProductId()]['orders']);

0 commit comments

Comments
 (0)