Skip to content

Commit ff82676

Browse files
Roman HaninRoman Hanin
authored andcommitted
B2B-2423: Optimize addProductsToCart operations
- CR fixes
1 parent 302c0af commit ff82676

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Quote/Model/Quote.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,7 @@ public function updateItem($itemId, $buyRequest, $params = null)
18441844
public function getItemByProduct($product)
18451845
{
18461846
/** @var \Magento\Quote\Model\Quote\Item[] $items */
1847-
$items = $this->getItemsCollection()->getItemsByColumnValue('product_id', $product->getId()) ?? [];
1847+
$items = $this->getItemsCollection()->getItemsByColumnValue('product_id', $product->getId());
18481848
foreach ($items as $item) {
18491849
if (!$item->isDeleted()
18501850
&& $item->getProduct()

0 commit comments

Comments
 (0)