Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 35a6639

Browse files
committed
MAGETWO-83476: Products in cart report error when we have grouped or bundle product #12082
- Merge Pull Request magento/magento2#12082 from mihaifaget/magento2:ISSUE-12079 - Merged commits: 1. 521e79e 2. f71fae5 3. d9485cc
2 parents fd8dcad + d9485cc commit 35a6639

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ protected function getProductData(array $productIds)
192192
. ' AND product_name.attribute_id = ' . $productAttrNameId
193193
. ' AND product_name.store_id = ' . \Magento\Store\Model\Store::DEFAULT_STORE_ID,
194194
['name' => 'product_name.value']
195-
)->joinInner(
195+
)->joinLeft(
196196
['product_price' => $productAttrPrice->getBackend()->getTable()],
197197
"product_price.{$linkField} = main_table.{$linkField}"
198198
." AND product_price.attribute_id = {$productAttrPriceId}",

app/code/Magento/Reports/Test/Unit/Model/ResourceModel/Report/Quote/CollectionTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ public function testLoadWithFilter()
124124
$this->selectMock->expects($this->once())->method('reset')->willReturnSelf();
125125
$this->selectMock->expects($this->once())->method('from')->willReturnSelf();
126126
$this->selectMock->expects($this->once())->method('useStraightJoin')->willReturnSelf();
127-
$this->selectMock->expects($this->exactly(2))->method('joinInner')->willReturnSelf();
127+
$this->selectMock->expects($this->once())->method('joinInner')->willReturnSelf();
128+
$this->selectMock->expects($this->once())->method('joinLeft')->willReturnSelf();
128129
$collection->expects($this->once())->method('getOrdersData')->willReturn([]);
129130
$productAttributeMock->expects($this->once())->method('getBackend')->willReturnSelf();
130131
$priceAttributeMock->expects($this->once())->method('getBackend')->willReturnSelf();

0 commit comments

Comments
 (0)