Skip to content

Commit b888418

Browse files
committed
ACP2E-4245: Bundle product price issue on cart page
- Item price was converted twice
1 parent 124a1f9 commit b888418

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

app/code/Magento/Tax/Block/Item/Price/Renderer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
* Item price render block
1919
*
2020
* @api
21-
* @author Magento Core Team <core@magentocommerce.com>
2221
* @since 100.0.2
2322
*/
2423
class Renderer extends \Magento\Framework\View\Element\Template
@@ -106,6 +105,8 @@ public function setZone($zone)
106105
}
107106

108107
/**
108+
* Get current store ID
109+
*
109110
* @return int|null|string
110111
*/
111112
public function getStoreId()
@@ -201,8 +202,7 @@ public function formatPrice($price)
201202
}
202203

203204
/**
204-
* Get item price in display currency or order currency depending
205-
* on item type
205+
* Get item price in display currency or order currency depending on item type
206206
*
207207
* @return float
208208
*/

app/code/Magento/Tax/Test/Unit/Block/Item/Price/RendererTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,11 @@ public function testGetItemDisplayPriceExclTaxQuoteItem()
359359
/** @var \Magento\Quote\Model\Quote\Item|MockObject $quoteItemMock */
360360
$quoteItemMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Item::class)
361361
->disableOriginalConstructor()
362-
->onlyMethods(['getCalculationPrice', '__wakeup'])
362+
->onlyMethods(['getPrice', '__wakeup'])
363363
->getMock();
364364

365365
$quoteItemMock->expects($this->once())
366-
->method('getCalculationPrice')
366+
->method('getPrice')
367367
->willReturn($price);
368368

369369
$this->renderer->setItem($quoteItemMock);

app/code/Magento/Weee/Test/Unit/Block/Item/Price/RendererTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected function setUp(): void
8080
'getBasePriceInclTax',
8181
'getQtyOrdered'
8282
])
83-
->onlyMethods(['getCalculationPrice'])
83+
->onlyMethods(['getPrice'])
8484
->getMock();
8585

8686
$this->item->expects($this->any())
@@ -291,7 +291,7 @@ public function testGetUnitDisplayPriceExclTax(
291291
->willReturn($weeeTax);
292292

293293
$this->item->expects($this->once())
294-
->method('getCalculationPrice')
294+
->method('getPrice')
295295
->willReturn($price);
296296

297297
$this->weeeHelper->expects($this->any())
@@ -601,7 +601,7 @@ public function testGetFinalUnitDisplayPriceExclTax(
601601
->willReturn($weeeTax);
602602

603603
$this->item->expects($this->once())
604-
->method('getCalculationPrice')
604+
->method('getPrice')
605605
->willReturn($rowTotal);
606606

607607
$this->assertEquals($expectedValue, $this->renderer->getFinalUnitDisplayPriceExclTax());

0 commit comments

Comments
 (0)