Skip to content

Commit a4113c6

Browse files
committed
Merge remote-tracking branch 'origin/ACP2E-4245' into PR_2025_11_04_flowers
2 parents 9a276c1 + cbe7b36 commit a4113c6

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

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

Lines changed: 4 additions & 9 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,19 +202,13 @@ 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
206206
*
207207
* @return float
208208
*/
209209
public function getItemDisplayPriceExclTax()
210210
{
211-
$item = $this->getItem();
212-
if ($item instanceof QuoteItem) {
213-
return $item->getCalculationPrice();
214-
} else {
215-
return $item->getPrice();
216-
}
211+
return $this->getItem()->getPrice();
217212
}
218213

219214
/**

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2015 Adobe
3+
* Copyright 2014 Adobe
44
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
@@ -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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Copyright 2015 Adobe
3+
* Copyright 2014 Adobe
44
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
@@ -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)