Skip to content

Commit 5c5978a

Browse files
merge magento/2.3-develop into magento-epam/EPAM-PR-66
2 parents de50b34 + a9a32dc commit 5c5978a

File tree

16 files changed

+122
-51
lines changed

16 files changed

+122
-51
lines changed

app/code/Magento/Catalog/Block/Product/ImageFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ public function create(Product $product, string $imageId, array $attributes = nu
160160
);
161161
}
162162

163+
$attributes = $attributes === null ? [] : $attributes;
164+
163165
$data = [
164166
'data' => [
165167
'template' => 'Magento_Catalog::product/image_with_borders.phtml',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,6 @@
114114
</assertEquals>
115115
<moveMouseOver selector="{{AdminOrderItemsOrderedSection.productNameOptions}} dd" stepKey="hoverProduct"/>
116116
<waitForElementVisible selector="{{AdminOrderItemsOrderedSection.productNameOptions}} dd:nth-child(2)" stepKey="waitForCustomOptionValueFullName"/>
117-
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="Optisfvdklvfnkljvnfdklpvnfdjklfdvnjkvfdkjnvfdjkfvndj111 11Optisfvdklvfnkljvnfdklpvnfdjklfdvnjkvfdkjnvfdjkfvndj11111" stepKey="seeAdminOrderProductOptionValueDropdown1"/>
117+
<see selector="{{AdminOrderItemsOrderedSection.productNameOptions}}" userInput="Optisfvdklvfnkljvnfdklpvnfdjklfdvnjkvfdkjnvfdjkfvndj11111Optisfvdklvfnkljvnfdklpvnfdjklfdvnjkvfdkjnvfdjkfvndj11111" stepKey="seeAdminOrderProductOptionValueDropdown1"/>
118118
</test>
119119
</tests>

app/code/Magento/Catalog/view/frontend/templates/product/view/form.phtml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,13 @@
3939
<?= $block->getChildHtml('form_bottom') ?>
4040
</form>
4141
</div>
42-
<script>
43-
require([
44-
'jquery',
45-
'priceBox'
46-
], function($){
47-
var dataPriceBoxSelector = '[data-role=priceBox]',
48-
dataProductIdSelector = '[data-product-id=<?= $block->escapeHtml($_product->getId()) ?>]',
49-
priceBoxes = $(dataPriceBoxSelector + dataProductIdSelector);
5042

51-
priceBoxes = priceBoxes.filter(function(index, elem){
52-
return !$(elem).find('.price-from').length;
53-
});
54-
55-
priceBoxes.priceBox({'priceConfig': <?= /* @noEscape */ $block->getJsonConfig() ?>});
56-
});
43+
<script type="text/x-magento-init">
44+
{
45+
"[data-role=priceBox][data-price-box=product-id-<?= $block->escapeHtml($_product->getId()) ?>]": {
46+
"priceBox": {
47+
"priceConfig": <?= /* @noEscape */ $block->getJsonConfig() ?>
48+
}
49+
}
50+
}
5751
</script>

app/code/Magento/Customer/Controller/Account/CreatePost.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Customer\Controller\Account;
79

810
use Magento\Customer\Api\CustomerRepositoryInterface as CustomerRepository;
@@ -349,15 +351,14 @@ public function execute()
349351
$confirmation = $this->getRequest()->getParam('password_confirmation');
350352
$redirectUrl = $this->session->getBeforeAuthUrl();
351353
$this->checkPasswordConfirmation($password, $confirmation);
354+
355+
$extensionAttributes = $customer->getExtensionAttributes();
356+
$extensionAttributes->setIsSubscribed($this->getRequest()->getParam('is_subscribed', false));
357+
$customer->setExtensionAttributes($extensionAttributes);
358+
352359
$customer = $this->accountManagement
353360
->createAccount($customer, $password, $redirectUrl);
354361

355-
if ($this->getRequest()->getParam('is_subscribed', false)) {
356-
$extensionAttributes = $customer->getExtensionAttributes();
357-
$extensionAttributes->setIsSubscribed(true);
358-
$customer->setExtensionAttributes($extensionAttributes);
359-
$this->customerRepository->save($customer);
360-
}
361362
$this->_eventManager->dispatch(
362363
'customer_register_success',
363364
['account_controller' => $this, 'customer' => $customer]

app/code/Magento/Eav/Model/ResourceModel/ReadHandler.php

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,27 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Eav\Model\ResourceModel;
78

9+
use Exception;
810
use Magento\Eav\Model\Config;
11+
use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
912
use Magento\Framework\DataObject;
1013
use Magento\Framework\DB\Select;
1114
use Magento\Framework\DB\Sql\UnionExpression;
1215
use Magento\Framework\EntityManager\MetadataPool;
1316
use Magento\Framework\EntityManager\Operation\AttributeInterface;
17+
use Magento\Framework\Exception\ConfigurationMismatchException;
18+
use Magento\Framework\Exception\LocalizedException;
1419
use Magento\Framework\Model\Entity\ScopeInterface;
1520
use Magento\Framework\Model\Entity\ScopeResolver;
1621
use Psr\Log\LoggerInterface;
1722

1823
/**
1924
* EAV read handler
25+
*
26+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2027
*/
2128
class ReadHandler implements AttributeInterface
2229
{
@@ -63,7 +70,7 @@ public function __construct(
6370
*
6471
* @param string $entityType
6572
* @return \Magento\Eav\Api\Data\AttributeInterface[]
66-
* @throws \Exception if for unknown entity type
73+
* @throws Exception if for unknown entity type
6774
* @deprecated Not used anymore
6875
* @see ReadHandler::getEntityAttributes
6976
*/
@@ -80,7 +87,7 @@ protected function getAttributes($entityType)
8087
* @param string $entityType
8188
* @param DataObject $entity
8289
* @return \Magento\Eav\Api\Data\AttributeInterface[]
83-
* @throws \Exception if for unknown entity type
90+
* @throws Exception if for unknown entity type
8491
*/
8592
private function getEntityAttributes(string $entityType, DataObject $entity): array
8693
{
@@ -111,9 +118,9 @@ protected function getContextVariables(ScopeInterface $scope)
111118
* @param array $entityData
112119
* @param array $arguments
113120
* @return array
114-
* @throws \Exception
115-
* @throws \Magento\Framework\Exception\ConfigurationMismatchException
116-
* @throws \Magento\Framework\Exception\LocalizedException
121+
* @throws Exception
122+
* @throws ConfigurationMismatchException
123+
* @throws LocalizedException
117124
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
118125
*/
119126
public function execute($entityType, $entityData, $arguments = [])
@@ -129,7 +136,7 @@ public function execute($entityType, $entityData, $arguments = [])
129136
$attributesMap = [];
130137
$selects = [];
131138

132-
/** @var \Magento\Eav\Model\Entity\Attribute\AbstractAttribute $attribute */
139+
/** @var AbstractAttribute $attribute */
133140
foreach ($this->getEntityAttributes($entityType, new DataObject($entityData)) as $attribute) {
134141
if (!$attribute->isStatic()) {
135142
$attributeTables[$attribute->getBackend()->getTable()][] = $attribute->getAttributeId();
@@ -170,8 +177,11 @@ public function execute($entityType, $entityData, $arguments = [])
170177
$entityData[$attributesMap[$attributeValue['attribute_id']]] = $attributeValue['value'];
171178
} else {
172179
$this->logger->warning(
173-
"Attempt to load value of nonexistent EAV attribute '{$attributeValue['attribute_id']}'
174-
for entity type '$entityType'."
180+
"Attempt to load value of nonexistent EAV attribute",
181+
[
182+
'attribute_id' => $attributeValue['attribute_id'],
183+
'entity_type' => $entityType
184+
]
175185
);
176186
}
177187
}
@@ -184,8 +194,9 @@ public function execute($entityType, $entityData, $arguments = [])
184194
*
185195
* @param Select[] $selects
186196
* @param array $identifiers
197+
* @return void
187198
*/
188-
private function applyIdentifierForSelects(array $selects, array $identifiers)
199+
private function applyIdentifierForSelects(array $selects, array $identifiers): void
189200
{
190201
foreach ($selects as $select) {
191202
foreach ($identifiers as $identifier) {

app/code/Magento/Sales/view/adminhtml/templates/items/column/name.phtml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@
2828
<?php else : ?>
2929
<?php $_option = $block->getFormattedOption($_option['value']); ?>
3030
<?php $dots = 'dots' . uniqid(); ?>
31-
<?= $block->escapeHtml($_option['value'], ['a']) ?><?php if (isset($_option['remainder']) && $_option['remainder']) : ?> <span id="<?= /* @noEscape */ $dots; ?>"> ...</span>
32-
<?php $id = 'id' . uniqid(); ?>
33-
<span id="<?= /* @noEscape */ $id; ?>"><?= $block->escapeHtml($_option['remainder'], ['a']) ?></span>
31+
<?php $id = 'id' . uniqid(); ?>
32+
<?= $block->escapeHtml($_option['value'], ['a']) ?><?php if (isset($_option['remainder']) && $_option['remainder']) : ?><span id="<?= /* @noEscape */ $dots; ?>"> ...</span><span id="<?= /* @noEscape */ $id; ?>"><?= $block->escapeHtml($_option['remainder'], ['a']) ?></span>
3433
<script>
3534
require(['prototype'], function() {
3635
$('<?= /* @noEscape */ $id; ?>').hide();

app/design/adminhtml/Magento/backend/web/css/source/components/_modals_extend.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333

3434
//
3535

36+
.modals-overlay {
37+
&:extend(.abs-modal-overlay all);
38+
}
39+
3640
.modal-popup,
3741
.modal-slide {
3842
.action-close {

app/design/frontend/Magento/blank/Magento_AdvancedCheckout/web/css/source/_module.less

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@
5353
}
5454

5555
.block-content {
56-
&:extend(.abs-add-clearfix-desktop all);
57-
58-
.box {
59-
&:extend(.abs-blocks-2columns all);
60-
}
61-
6256
.actions-toolbar {
6357
clear: both;
6458
.lib-actions-toolbar(
@@ -167,4 +161,16 @@
167161
&:extend(.abs-add-clearfix-desktop all);
168162
}
169163
}
164+
165+
.column {
166+
.block-addbysku {
167+
.block-content {
168+
&:extend(.abs-add-clearfix-desktop all);
169+
170+
.box {
171+
&:extend(.abs-blocks-2columns all);
172+
}
173+
}
174+
}
175+
}
170176
}

app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_estimated-total.less

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
.opc-estimated-wrapper {
1717
&:extend(.abs-add-clearfix all);
18-
&:extend(.abs-no-display-desktop all);
1918
.lib-css(border-bottom, @border-width__base solid @color-gray80);
2019
margin: 0 0 15px;
2120
padding: 18px 15px;
@@ -37,7 +36,7 @@
3736
&:before {
3837
.lib-css(color, @button__color);
3938
}
40-
39+
4140
&:hover:before {
4241
.lib-css(color, @button__hover__color);
4342
}
@@ -53,6 +52,6 @@
5352

5453
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
5554
.opc-estimated-wrapper {
56-
display: none;
55+
&:extend(.abs-no-display-desktop all);
5756
}
5857
}

app/design/frontend/Magento/blank/Magento_GiftMessage/web/css/source/_module.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
& when (@media-common = true) {
1919
.gift-message {
2020
.field {
21-
&:extend(.abs-clearfix all);
2221
margin-bottom: @indent__base;
2322

2423
.label {

0 commit comments

Comments
 (0)