Skip to content
Snippets Groups Projects
Unverified Commit ee37eb30 authored by angelo983's avatar angelo983 Committed by GitHub
Browse files

Update Collection.php

parent 0c0393d4
No related merge requests found
......@@ -220,8 +220,10 @@ class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\Ab
$orderData = $this->getOrdersData($productIds);
foreach ($items as $item) {
$item->setId($item->getProductId());
$item->setPrice($productData[$item->getProductId()]['price'] * $item->getBaseToGlobalRate());
$item->setName($productData[$item->getProductId()]['name']);
if (isset($productData[$item->getProductId()])) {
$item->setPrice($productData[$item->getProductId()]['price'] * $item->getBaseToGlobalRate());
$item->setName($productData[$item->getProductId()]['name']);
}
$item->setOrders(0);
if (isset($orderData[$item->getProductId()])) {
$item->setOrders($orderData[$item->getProductId()]['orders']);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment