Skip to content

Commit 5733a1a

Browse files
committed
Merge remote-tracking branch 'mainline/2.3-develop' into RE-develop-pr
2 parents 6087acc + f0c4347 commit 5733a1a

File tree

21 files changed

+164
-60
lines changed

21 files changed

+164
-60
lines changed

app/code/Magento/Captcha/view/frontend/templates/default.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $captcha = $block->getCaptchaModel();
1414
<div class="field captcha required" role="<?= $block->escapeHtmlAttr($block->getFormId()) ?>">
1515
<label for="captcha_<?= $block->escapeHtmlAttr($block->getFormId()) ?>" class="label"><span><?= $block->escapeHtml(__('Please type the letters and numbers below')) ?></span></label>
1616
<div class="control captcha">
17-
<input name="<?= $block->escapeHtmlAttr(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE) ?>[<?= $block->escapeHtmlAttr($block->getFormId()) ?>]" type="text" class="input-text required-entry" data-validate="{required:true}" id="captcha_<?= $block->escapeHtmlAttr($block->getFormId()) ?>" />
17+
<input name="<?= $block->escapeHtmlAttr(\Magento\Captcha\Helper\Data::INPUT_NAME_FIELD_VALUE) ?>[<?= $block->escapeHtmlAttr($block->getFormId()) ?>]" type="text" class="input-text required-entry" data-validate="{required:true}" id="captcha_<?= $block->escapeHtmlAttr($block->getFormId()) ?>" autocomplete="off"/>
1818
<div class="nested">
1919
<div class="field captcha no-label"
2020
data-captcha="<?= $block->escapeHtmlAttr($block->getFormId()) ?>"

app/code/Magento/Captcha/view/frontend/web/template/checkout/captcha.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div class="field captcha required" data-bind="blockLoader: getIsLoading()">
99
<label data-bind="attr: {for: 'captcha_' + formId}" class="label"><span data-bind="i18n: 'Please type the letters and numbers below'"></span></label>
1010
<div class="control captcha">
11-
<input name="captcha_string" type="text" class="input-text required-entry" data-bind="value: captchaValue(), attr: {id: 'captcha_' + formId, 'data-scope': dataScope}" />
11+
<input name="captcha_string" type="text" class="input-text required-entry" data-bind="value: captchaValue(), attr: {id: 'captcha_' + formId, 'data-scope': dataScope}" autocomplete="off"/>
1212
<input name="captcha_form_id" type="hidden" data-bind="value: formId, attr: {'data-scope': dataScope}" />
1313
<div class="nested">
1414
<div class="field captcha no-label">

app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
<?= ($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?>
2020
data-price-amount="<?= /* @escapeNotVerified */ $block->getDisplayValue() ?>"
2121
data-price-type="<?= /* @escapeNotVerified */ $block->getPriceType() ?>"
22-
class="price-wrapper <?= /* @escapeNotVerified */ $block->getPriceWrapperCss() ?>">
23-
<?= /* @escapeNotVerified */ $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?>
24-
</span>
22+
class="price-wrapper <?= /* @escapeNotVerified */ $block->getPriceWrapperCss() ?>"
23+
><?= /* @escapeNotVerified */ $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?></span>
2524
<?php if ($block->hasAdjustmentsHtml()): ?>
2625
<?= $block->getAdjustmentsHtml() ?>
2726
<?php endif; ?>

app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/ApplyRules.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ public function execute()
2525
$ruleJob->applyAll();
2626

2727
if ($ruleJob->hasSuccess()) {
28-
$this->messageManager->addSuccess($ruleJob->getSuccess());
28+
$this->messageManager->addSuccessMessage($ruleJob->getSuccess());
2929
$this->_objectManager->create(\Magento\CatalogRule\Model\Flag::class)->loadSelf()->setState(0)->save();
3030
} elseif ($ruleJob->hasError()) {
31-
$this->messageManager->addError($errorMessage . ' ' . $ruleJob->getError());
31+
$this->messageManager->addErrorMessage($errorMessage . ' ' . $ruleJob->getError());
3232
}
3333
} catch (\Exception $e) {
3434
$this->_objectManager->create(\Psr\Log\LoggerInterface::class)->critical($e);
35-
$this->messageManager->addError($errorMessage);
35+
$this->messageManager->addErrorMessage($errorMessage);
3636
}
3737

3838
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */

app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Delete.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ public function execute()
2525
$ruleRepository->deleteById($id);
2626

2727
$this->_objectManager->create(\Magento\CatalogRule\Model\Flag::class)->loadSelf()->setState(1)->save();
28-
$this->messageManager->addSuccess(__('You deleted the rule.'));
28+
$this->messageManager->addSuccessMessage(__('You deleted the rule.'));
2929
$this->_redirect('catalog_rule/*/');
3030
return;
3131
} catch (LocalizedException $e) {
32-
$this->messageManager->addError($e->getMessage());
32+
$this->messageManager->addErrorMessage($e->getMessage());
3333
} catch (\Exception $e) {
34-
$this->messageManager->addError(
34+
$this->messageManager->addErrorMessage(
3535
__('We can\'t delete this rule right now. Please review the log and try again.')
3636
);
3737
$this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
3838
$this->_redirect('catalog_rule/*/edit', ['id' => $this->getRequest()->getParam('id')]);
3939
return;
4040
}
4141
}
42-
$this->messageManager->addError(__('We can\'t find a rule to delete.'));
42+
$this->messageManager->addErrorMessage(__('We can\'t find a rule to delete.'));
4343
$this->_redirect('catalog_rule/*/');
4444
}
4545
}

app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function execute()
2424
try {
2525
$model = $ruleRepository->get($id);
2626
} catch (\Magento\Framework\Exception\NoSuchEntityException $exception) {
27-
$this->messageManager->addError(__('This rule no longer exists.'));
27+
$this->messageManager->addErrorMessage(__('This rule no longer exists.'));
2828
$this->_redirect('catalog_rule/*');
2929
return;
3030
}

app/code/Magento/CatalogRule/Controller/Adminhtml/Promo/Catalog/Save.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function execute()
6868
$validateResult = $model->validateData(new \Magento\Framework\DataObject($data));
6969
if ($validateResult !== true) {
7070
foreach ($validateResult as $errorMessage) {
71-
$this->messageManager->addError($errorMessage);
71+
$this->messageManager->addErrorMessage($errorMessage);
7272
}
7373
$this->_getSession()->setPageData($data);
7474
$this->dataPersistor->set('catalog_rule', $data);
@@ -88,7 +88,7 @@ public function execute()
8888

8989
$ruleRepository->save($model);
9090

91-
$this->messageManager->addSuccess(__('You saved the rule.'));
91+
$this->messageManager->addSuccessMessage(__('You saved the rule.'));
9292
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setPageData(false);
9393
$this->dataPersistor->clear('catalog_rule');
9494

@@ -111,9 +111,9 @@ public function execute()
111111
}
112112
return;
113113
} catch (LocalizedException $e) {
114-
$this->messageManager->addError($e->getMessage());
114+
$this->messageManager->addErrorMessage($e->getMessage());
115115
} catch (\Exception $e) {
116-
$this->messageManager->addError(
116+
$this->messageManager->addErrorMessage(
117117
__('Something went wrong while saving the rule data. Please review the error log.')
118118
);
119119
$this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);

app/code/Magento/CatalogRule/Plugin/Indexer/Product/Attribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected function checkCatalogRulesAvailability($attributeCode)
103103

104104
if ($disabledRulesCount) {
105105
$this->ruleProductProcessor->markIndexerAsInvalid();
106-
$this->messageManager->addWarning(
106+
$this->messageManager->addWarningMessage(
107107
__(
108108
'You disabled %1 Catalog Price Rules based on "%2" attribute.',
109109
$disabledRulesCount,

app/code/Magento/ConfigurableProduct/Setup/Patch/Data/InstallInitialConfigurableAttributes.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public function apply()
5151
$eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
5252
$attributes = [
5353
'country_of_manufacture',
54+
'manufacturer',
5455
'minimal_price',
5556
'msrp',
5657
'msrp_display_actual_price_type',
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\ConfigurableProduct\Setup\Patch\Data;
9+
10+
use Magento\Eav\Setup\EavSetup;
11+
use Magento\Eav\Setup\EavSetupFactory;
12+
use Magento\Framework\Setup\ModuleDataSetupInterface;
13+
use Magento\Framework\Setup\Patch\DataPatchInterface;
14+
use Magento\Framework\Setup\Patch\PatchVersionInterface;
15+
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
16+
17+
/**
18+
* Class UpdateManufacturerAttribute
19+
* @package Magento\ConfigurableProduct\Setup\Patch
20+
*/
21+
class UpdateManufacturerAttribute implements DataPatchInterface, PatchVersionInterface
22+
{
23+
/**
24+
* @var ModuleDataSetupInterface
25+
*/
26+
private $moduleDataSetup;
27+
28+
/**
29+
* @var EavSetupFactory
30+
*/
31+
private $eavSetupFactory;
32+
33+
/**
34+
* UpdateTierPriceAttribute constructor.
35+
* @param ModuleDataSetupInterface $moduleDataSetup
36+
* @param EavSetupFactory $eavSetupFactory
37+
*/
38+
public function __construct(
39+
ModuleDataSetupInterface $moduleDataSetup,
40+
EavSetupFactory $eavSetupFactory
41+
) {
42+
$this->moduleDataSetup = $moduleDataSetup;
43+
$this->eavSetupFactory = $eavSetupFactory;
44+
}
45+
46+
/**
47+
* {@inheritdoc}
48+
*/
49+
public function apply()
50+
{
51+
/** @var EavSetup $eavSetup */
52+
$eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
53+
$relatedProductTypes = explode(
54+
',',
55+
$eavSetup->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'manufacturer', 'apply_to')
56+
);
57+
58+
if (!in_array(Configurable::TYPE_CODE, $relatedProductTypes)) {
59+
$relatedProductTypes[] = Configurable::TYPE_CODE;
60+
$eavSetup->updateAttribute(
61+
\Magento\Catalog\Model\Product::ENTITY,
62+
'manufacturer',
63+
'apply_to',
64+
implode(',', $relatedProductTypes)
65+
);
66+
}
67+
}
68+
69+
/**
70+
* {@inheritdoc}
71+
*/
72+
public static function getDependencies()
73+
{
74+
return [
75+
InstallInitialConfigurableAttributes::class,
76+
];
77+
}
78+
79+
/**
80+
* {@inheritdoc}\
81+
*/
82+
public static function getVersion()
83+
{
84+
return '2.2.1';
85+
}
86+
87+
/**
88+
* {@inheritdoc}
89+
*/
90+
public function getAliases()
91+
{
92+
return [];
93+
}
94+
}

0 commit comments

Comments
 (0)