Skip to content

Commit 8fe6061

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into MC-17269
2 parents fdfa9cb + 21b3caf commit 8fe6061

File tree

81 files changed

+1591
-256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1591
-256
lines changed

app/code/Magento/AdvancedSearch/view/adminhtml/templates/system/config/testconnection.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
"successText": "<?= $block->escapeHtmlAttr(__('Successful! Test again?')) ?>",
1212
"failedText": "<?= $block->escapeHtmlAttr(__('Connection failed! Test again?')) ?>",
1313
"fieldMapping": "<?= /* @noEscape */ $block->getFieldMapping() ?>"}, "validation": {}}'>
14-
<span><span><span id="<?= $block->getHtmlId() ?>_result"><?= $block->escapeHtml($block->getButtonLabel()) ?></span></span></span>
14+
<span id="<?= $block->getHtmlId() ?>_result"><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
1515
</button>

app/code/Magento/Backend/Block/Dashboard/Bar.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Backend\Block\Dashboard;
77

8+
use Magento\Store\Model\Store;
9+
810
/**
911
* Adminhtml dashboard bar block
1012
*
@@ -23,6 +25,8 @@ class Bar extends \Magento\Backend\Block\Dashboard\AbstractDashboard
2325
protected $_currentCurrencyCode = null;
2426

2527
/**
28+
* Get totals
29+
*
2630
* @return array
2731
*/
2832
public function getTotals()
@@ -31,6 +35,8 @@ public function getTotals()
3135
}
3236

3337
/**
38+
* Add total
39+
*
3440
* @param string $label
3541
* @param float $value
3642
* @param bool $isQuantity
@@ -73,6 +79,7 @@ public function setCurrency($currency)
7379
* Retrieve currency model if not set then return currency model for current store
7480
*
7581
* @return \Magento\Directory\Model\Currency
82+
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
7683
*/
7784
public function getCurrency()
7885
{
@@ -90,7 +97,8 @@ public function getCurrency()
9097
$this->getRequest()->getParam('group')
9198
)->getWebsite()->getBaseCurrency();
9299
} else {
93-
$this->_currentCurrencyCode = $this->_storeManager->getStore()->getBaseCurrency();
100+
$this->_currentCurrencyCode = $this->_storeManager->getStore(Store::DEFAULT_STORE_ID)
101+
->getBaseCurrency();
94102
}
95103
}
96104

app/code/Magento/Backend/Block/Widget/Grid/Column/Multistore.php

Lines changed: 2 additions & 9 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\Backend\Block\Widget\Grid\Column;
79

810
/**
@@ -14,15 +16,6 @@
1416
*/
1517
class Multistore extends \Magento\Backend\Block\Widget\Grid\Column
1618
{
17-
/**
18-
* @param \Magento\Backend\Block\Template\Context $context
19-
* @param array $data
20-
*/
21-
public function __construct(\Magento\Backend\Block\Template\Context $context, array $data = [])
22-
{
23-
parent::__construct($context, $data);
24-
}
25-
2619
/**
2720
* Get header css class name
2821
*

app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@
8383
<!-- Create invoice -->
8484
<comment userInput="Create invoice" stepKey="createInvoice"/>
8585
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
86+
<waitForPageLoad stepKey="waitForOrderPageToLoad"/>
8687
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceButton"/>
88+
<waitForPageLoad stepKey="waitForInvoicePageToLoad"/>
8789
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seeNewInvoiceInPageTitle" after="clickInvoiceButton"/>
8890
<see selector="{{AdminInvoiceTotalSection.total('Subtotal')}}" userInput="$150.00" stepKey="seeCorrectGrandTotal"/>
8991
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/>

app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
<?php if ($block->hasDefaultOption()) : ?>
3737
<li class="store-switcher-all <?php if (!($block->getDefaultSelectionName() != $block->getCurrentSelectionName())) : ?>disabled<?php endif; ?> <?php if (!$block->hasScopeSelected()) : ?>current<?php endif; ?>">
3838
<?php if ($block->getDefaultSelectionName() != $block->getCurrentSelectionName()) : ?>
39-
?>
4039
<a data-role="store-view-id" data-value="" href="#">
4140
<?= $block->escapeHtml($block->getDefaultSelectionName()) ?>
4241
</a>

app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Attributes;
88

99
/**
10-
* Bundle Extended Attribures Block.
10+
* Bundle Extended Attributes Block.
1111
*
1212
* @author Magento Core Team <core@magentocommerce.com>
1313
*/

app/code/Magento/Catalog/Helper/Product.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/**
1515
* Catalog category helper
1616
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
17+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
1718
*/
1819
class Product extends \Magento\Framework\Url\Helper\Data
1920
{
@@ -268,6 +269,8 @@ public function getThumbnailUrl($product)
268269
}
269270

270271
/**
272+
* Retrieve email to friend url
273+
*
271274
* @param ModelProduct $product
272275
* @return string
273276
*/
@@ -282,6 +285,8 @@ public function getEmailToFriendUrl($product)
282285
}
283286

284287
/**
288+
* Get statuses
289+
*
285290
* @return array
286291
*/
287292
public function getStatuses()
@@ -476,6 +481,7 @@ public function initProduct($productId, $controller, $params = null)
476481

477482
/**
478483
* Prepares product options by buyRequest: retrieves values and assigns them as default.
484+
*
479485
* Also parses and adds product management related values - e.g. qty
480486
*
481487
* @param ModelProduct $product
@@ -493,6 +499,7 @@ public function prepareProductOptions($product, $buyRequest)
493499

494500
/**
495501
* Process $buyRequest and sets its options before saving configuration to some product item.
502+
*
496503
* This method is used to attach additional parameters to processed buyRequest.
497504
*
498505
* $params holds parameters of what operation must be performed:
@@ -541,8 +548,6 @@ public function addParamsToBuyRequest($buyRequest, $params)
541548
/**
542549
* Set flag that shows if Magento has to check product to be saleable (enabled and/or inStock)
543550
*
544-
* For instance, during order creation in the backend admin has ability to add any products to order
545-
*
546551
* @param bool $skipSaleableCheck
547552
* @return Product
548553
*/

app/code/Magento/Catalog/Model/Product/Url.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,8 @@ public function getUrl(\Magento\Catalog\Model\Product $product, $params = [])
162162
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
163163
);
164164

165-
if ($categoryId) {
166-
$filterData[UrlRewrite::METADATA]['category_id'] = $categoryId;
167-
} elseif (!$useCategories) {
168-
$filterData[UrlRewrite::METADATA]['category_id'] = '';
169-
}
165+
$filterData[UrlRewrite::METADATA]['category_id']
166+
= $categoryId && $useCategories ? $categoryId : '';
170167

171168
$rewrite = $this->urlFinder->findOneByData($filterData);
172169

app/code/Magento/Catalog/Model/ProductRepository/MediaGalleryProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ private function processEntries(ProductInterface $product, array $newEntries, ar
231231
private function processMediaAttributes(ProductInterface $product, array $images): void
232232
{
233233
foreach ($images as $image) {
234-
if (!isset($image['removed']) && !empty($image['types'])) {
234+
if (empty($image['removed']) && !empty($image['types'])) {
235235
$this->processor->setMediaAttribute($product, $image['types'], $image['file']);
236236
}
237237
}

app/code/Magento/Catalog/Plugin/Block/Topmenu.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
*/
1515
class Topmenu
1616
{
17+
/**
18+
* Cache tag for menu block
19+
*/
20+
private $cacheTag = "top_menu";
21+
1722
/**
1823
* Catalog category
1924
*
@@ -119,6 +124,7 @@ public function beforeGetIdentities(\Magento\Theme\Block\Html\Topmenu $subject)
119124
$subject->addIdentity(Category::CACHE_TAG);
120125
$rootId = $this->storeManager->getStore()->getRootCategoryId();
121126
$storeId = $this->storeManager->getStore()->getId();
127+
$currentCategory = $this->getCurrentCategory();
122128
/** @var \Magento\Catalog\Model\ResourceModel\Category\Collection $collection */
123129
$collection = $this->getCategoryTree($storeId, $rootId);
124130
$mapping = [$rootId => $subject->getMenu()]; // use nodes stack to avoid recursion
@@ -128,6 +134,9 @@ public function beforeGetIdentities(\Magento\Theme\Block\Html\Topmenu $subject)
128134
}
129135
$subject->addIdentity(Category::CACHE_TAG . '_' . $category->getId());
130136
}
137+
if ($currentCategory) {
138+
$subject->addIdentity($this->cacheTag . '_' . Category::CACHE_TAG . '_' . $currentCategory->getId());
139+
}
131140
}
132141

133142
/**

0 commit comments

Comments
 (0)