Skip to content

Commit 6e13440

Browse files
Merge pull request #10127 from adobe-commerce-tier-4/PR_2025_09_25_muntianu
[Support Tier-4 muntianu] 09-25-2025 Regular delivery of bugfixes and improvements
2 parents 59ff8f4 + 96ea855 commit 6e13440

File tree

30 files changed

+654
-116
lines changed

30 files changed

+654
-116
lines changed

app/code/Magento/Bundle/Test/Unit/Pricing/Price/BundleRegularPriceTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testGetAmount()
9898
->willReturn($expectedResult);
9999

100100
$this->priceCurrencyMock->expects($this->once())
101-
->method('convertAndRound')
101+
->method('convert')
102102
->willReturnArgument(0);
103103

104104
$result = $this->regularPrice->getAmount();
@@ -123,7 +123,7 @@ public function testGetMaximalPrice()
123123
->willReturn($expectedResult);
124124

125125
$this->priceCurrencyMock->expects($this->once())
126-
->method('convertAndRound')
126+
->method('convert')
127127
->willReturnArgument(0);
128128

129129
$result = $this->regularPrice->getMaximalPrice();
@@ -165,7 +165,7 @@ public function testGetMaximalPriceForFixedPriceBundleWithOption()
165165
->willReturn($expectedPrice);
166166

167167
$this->priceCurrencyMock->expects($this->once())
168-
->method('convertAndRound')
168+
->method('convert')
169169
->willReturnArgument(0);
170170

171171
$result = $this->regularPrice->getMaximalPrice();
@@ -185,7 +185,7 @@ public function testGetMinimalPrice()
185185
->willReturn($expectedResult);
186186

187187
$this->priceCurrencyMock->expects($this->once())
188-
->method('convertAndRound')
188+
->method('convert')
189189
->willReturnArgument(0);
190190

191191
$this->bundleCalculatorMock->expects($this->once())
@@ -226,7 +226,7 @@ public function testGetMinimalPriceForFixedPricedBundleWithOptions()
226226
->willReturn($minOptionPrice);
227227

228228
$this->priceCurrencyMock->expects($this->once())
229-
->method('convertAndRound')
229+
->method('convert')
230230
->willReturnArgument(0);
231231

232232
$this->bundleCalculatorMock->expects($this->once())

app/code/Magento/Catalog/Pricing/Price/RegularPrice.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
use Magento\Framework\Pricing\Price\BasePriceProviderInterface;
1111

1212
/**
13-
* Class RegularPrice
13+
* Regular Price model
1414
*/
1515
class RegularPrice extends AbstractPrice implements BasePriceProviderInterface
1616
{
1717
/**
1818
* Price type
1919
*/
20-
const PRICE_CODE = 'regular_price';
20+
public const PRICE_CODE = 'regular_price';
2121

2222
/**
2323
* Get price value
@@ -28,7 +28,7 @@ public function getValue()
2828
{
2929
if ($this->value === null) {
3030
$price = $this->product->getPrice();
31-
$priceInCurrentCurrency = $this->priceCurrency->convertAndRound($price);
31+
$priceInCurrentCurrency = $this->priceCurrency->convert($price);
3232
$this->value = $priceInCurrentCurrency ? (float)$priceInCurrentCurrency : 0;
3333
}
3434
return $this->value;

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontCheckCustomOptionPriceDifferentCurrencyTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<argument name="currency" value="EUR"/>
6262
</actionGroup>
6363
<actionGroup ref="AssertStorefrontCustomOptionCheckboxByPriceActionGroup" stepKey="checkPriceProductOptionEUR">
64-
<argument name="price" value="8.7"/>
64+
<argument name="price" value="8.69"/>
6565
</actionGroup>
6666
</test>
6767
</tests>

app/code/Magento/Catalog/Test/Unit/Pricing/Price/RegularPriceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function testGetValue($price)
8080
->method('getPrice')
8181
->willReturn($price);
8282
$this->priceCurrencyMock->expects($this->any())
83-
->method('convertAndRound')
83+
->method('convert')
8484
->with($price)
8585
->willReturn($convertedPrice);
8686
$this->assertEquals($convertedPrice, $this->regularPrice->getValue());
@@ -114,7 +114,7 @@ public function testGetAmount()
114114
->method('getPrice')
115115
->willReturn($priceValue);
116116
$this->priceCurrencyMock->expects($this->any())
117-
->method('convertAndRound')
117+
->method('convert')
118118
->with($priceValue)
119119
->willReturn($convertedPrice);
120120
$this->calculatorMock->expects($this->once())

app/code/Magento/Contact/view/frontend/templates/form.phtml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2011 Adobe
4+
* All Rights Reserved.
55
*/
66

77
// phpcs:disable Magento2.Templates.ThisInTemplate
88
// phpcs:disable Generic.Files.LineLength.TooLong
99

1010
/** @var \Magento\Contact\Block\ContactForm $block */
11-
if (!$block->getButtonLockManager()) {
12-
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
13-
$block->setButtonLockManager(
14-
$objectManager->get(\Magento\Framework\View\Element\ButtonLockManager::class)
15-
);
16-
}
11+
/** @var \Magento\Framework\View\Element\ButtonLockManager|null $buttonLockManager */
12+
$buttonLockManager = $block->getData('button_lock_manager');
1713
/** @var $escaper \Magento\Framework\Escaper */
1814
/** @var \Magento\Contact\ViewModel\UserDataProvider $viewModel */
1915

@@ -89,7 +85,7 @@ $viewModel = $block->getViewModel();
8985
<input type="hidden" name="hideit" id="hideit" value="" />
9086
<button type="submit" title="<?= $escaper->escapeHtmlAttr(__('Submit')) ?>" class="action submit primary"
9187
id="send2"
92-
<?php if ($block->getButtonLockManager()->isDisabled('contact_us_form_submit')): ?>
88+
<?php if ($buttonLockManager?->isDisabled('contact_us_form_submit')): ?>
9389
disabled="disabled"
9490
<?php endif; ?>>
9591
<span><?= $escaper->escapeHtml(__('Submit')) ?></span>

app/code/Magento/Customer/view/frontend/templates/form/edit.phtml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2011 Adobe
4+
* All Rights Reserved.
55
*/
66

77
use Magento\Customer\Block\Widget\Name;
88

99
/** @var \Magento\Customer\Block\Form\Edit $block */
10-
if (!$block->getButtonLockManager()) {
11-
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
12-
$block->setButtonLockManager(
13-
$objectManager->get(\Magento\Framework\View\Element\ButtonLockManager::class)
14-
);
15-
}
10+
/** @var \Magento\Framework\View\Element\ButtonLockManager|null $buttonLockManager */
11+
$buttonLockManager = $block->getData('button_lock_manager');
1612
/** @var $escaper \Magento\Framework\Escaper */
1713
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
1814
?>
@@ -123,7 +119,7 @@ if (!$block->getButtonLockManager()) {
123119
<div class="actions-toolbar">
124120
<div class="primary">
125121
<button type="submit" class="action save primary" title="<?= $escaper->escapeHtmlAttr(__('Save')) ?>"
126-
<?php if ($block->getButtonLockManager()->isDisabled('customer_edit_form_submit')): ?>
122+
<?php if ($buttonLockManager?->isDisabled('customer_edit_form_submit')): ?>
127123
disabled="disabled"
128124
<?php endif; ?>>
129125
<span><?= $escaper->escapeHtml(__('Save')) ?></span>

app/code/Magento/Customer/view/frontend/templates/form/forgotpassword.phtml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@
99
// phpcs:disable Generic.Files.LineLength.TooLong
1010

1111
/** @var \Magento\Customer\Block\Account\Forgotpassword $block */
12-
if (!$block->getButtonLockManager()) {
13-
// phpcs:ignore
14-
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
15-
$block->setButtonLockManager(
16-
$objectManager->get(\Magento\Framework\View\Element\ButtonLockManager::class)
17-
);
18-
}
12+
/** @var \Magento\Framework\View\Element\ButtonLockManager|null $buttonLockManager */
13+
$buttonLockManager = $block->getData('button_lock_manager');
1914
/** @var $escaper \Magento\Framework\Escaper */
2015
?>
2116
<form class="form password forget"
@@ -35,7 +30,7 @@ if (!$block->getButtonLockManager()) {
3530
</fieldset>
3631
<div class="actions-toolbar">
3732
<div class="primary">
38-
<button type="submit" class="action submit primary" id="send2" <?php if ($block->getButtonLockManager()->isDisabled('customer_forgot_password_form_submit')): ?> disabled="disabled" <?php endif; ?>><span><?= $escaper->escapeHtml(__('Reset My Password')) ?></span></button>
33+
<button type="submit" class="action submit primary" id="send2" <?php if ($buttonLockManager?->isDisabled('customer_forgot_password_form_submit')): ?> disabled="disabled" <?php endif; ?>><span><?= $escaper->escapeHtml(__('Reset My Password')) ?></span></button>
3934
</div>
4035
<div class="secondary">
4136
<a class="action back" href="<?= $escaper->escapeUrl($block->getLoginUrl()) ?>"><span><?= $escaper->escapeHtml(__('Go back')) ?></span></a>

app/code/Magento/Customer/view/frontend/templates/form/login.phtml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,8 @@
77
// phpcs:disable Generic.Files.LineLength.TooLong
88

99
/** @var \Magento\Customer\Block\Form\Login $block */
10-
if (!$block->getButtonLockManager()) {
11-
// phpcs:ignore
12-
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
13-
$block->setButtonLockManager(
14-
$objectManager->get(\Magento\Framework\View\Element\ButtonLockManager::class)
15-
);
16-
}
10+
/** @var \Magento\Framework\View\Element\ButtonLockManager|null $buttonLockManager */
11+
$buttonLockManager = $block->getData('button_lock_manager');
1712
/** @var $escaper \Magento\Framework\Escaper */
1813
?>
1914
<div class="block block-customer-login">
@@ -55,7 +50,7 @@ if (!$block->getButtonLockManager()) {
5550
<?= $block->getChildHtml('form_additional_info') ?>
5651
<div class="actions-toolbar">
5752
<div class="primary">
58-
<button type="submit" class="action login primary" name="send" id="send2" <?php if ($block->getButtonLockManager()->isDisabled('customer_login_form_submit')): ?> disabled="disabled" <?php endif; ?>>
53+
<button type="submit" class="action login primary" name="send" id="send2" <?php if ($buttonLockManager?->isDisabled('customer_login_form_submit')): ?> disabled="disabled" <?php endif; ?>>
5954
<span><?= $escaper->escapeHtml(__('Sign In')) ?></span>
6055
</button>
6156
</div>

app/code/Magento/Customer/view/frontend/templates/form/register.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use Magento\Customer\Helper\Address;
1010
/** @var \Magento\Framework\Escaper $escaper */
1111
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
1212
/** @var \Magento\Framework\View\Element\ButtonLockManager|null $buttonLockManager */
13-
$buttonLockManager = $block->getButtonLockManager();
13+
$buttonLockManager = $block->getData('button_lock_manager');
1414

1515
/** @var Magento\Customer\Helper\Address $addressHelper */
1616
$addressHelper = $block->getData('addressHelper');
@@ -297,7 +297,7 @@ $formData = $block->getFormData();
297297
class="action submit primary"
298298
title="<?= $escaper->escapeHtmlAttr(__('Create an Account')) ?>"
299299
id="send2"
300-
<?php if ($buttonLockManager && $buttonLockManager->isDisabled('customer_create_form_submit')): ?>
300+
<?php if ($buttonLockManager?->isDisabled('customer_create_form_submit')): ?>
301301
disabled="disabled"
302302
<?php endif; ?>>
303303
<span><?= $escaper->escapeHtml(__('Create an Account')) ?></span>

app/code/Magento/Newsletter/view/frontend/templates/subscribe.phtml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2011 Adobe
4+
* All Rights Reserved.
55
*/
66

77
/** @var \Magento\Newsletter\Block\Subscribe $block */
8-
if (!$block->getButtonLockManager()) {
9-
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
10-
$block->setButtonLockManager(
11-
$objectManager->get(\Magento\Framework\View\Element\ButtonLockManager::class)
12-
);
13-
}
8+
/** @var \Magento\Framework\View\Element\ButtonLockManager|null $buttonLockManager */
9+
$buttonLockManager = $block->getData('button_lock_manager');
1410
/** @var $escaper \Magento\Framework\Escaper */
1511
?>
1612
<div class="block newsletter">
@@ -41,7 +37,7 @@ if (!$block->getButtonLockManager()) {
4137
title="<?= $escaper->escapeHtmlAttr(__('Subscribe')) ?>"
4238
type="submit"
4339
aria-label="Subscribe"
44-
<?php if ($block->getButtonLockManager()->isDisabled('newsletter_form_submit')): ?>
40+
<?php if ($buttonLockManager?->isDisabled('newsletter_form_submit')): ?>
4541
disabled="disabled"
4642
<?php endif; ?>>
4743
<span><?= $escaper->escapeHtml(__('Subscribe')) ?></span>

0 commit comments

Comments
 (0)