Skip to content

Commit b7ec090

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-92005' into 2.3-develop-pr20
2 parents c7bf6a4 + 9e7f234 commit b7ec090

File tree

12 files changed

+81
-14
lines changed

12 files changed

+81
-14
lines changed

app/code/Magento/Catalog/Model/Product/Price/TierPriceStorage.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,10 @@ private function getExistingPrices(array $skus, $groupBySku = false)
172172
$rawPrices = $this->tierPricePersistence->get($ids);
173173
$prices = [];
174174

175+
$linkField = $this->tierPricePersistence->getEntityLinkField();
176+
$skuByIdLookup = $this->buildSkuByIdLookup($skus);
175177
foreach ($rawPrices as $rawPrice) {
176-
$sku = $this->retrieveSkuById($rawPrice[$this->tierPricePersistence->getEntityLinkField()], $skus);
178+
$sku = $skuByIdLookup[$rawPrice[$linkField]];
177179
$price = $this->tierPriceFactory->create($rawPrice, $sku);
178180
if ($groupBySku) {
179181
$prices[$sku][] = $price;
@@ -300,21 +302,21 @@ private function isCorrectPriceValue(array $existingPrice, array $price)
300302
}
301303

302304
/**
303-
* Retrieve SKU by product ID.
305+
* Generate lookup to retrieve SKU by product ID.
304306
*
305-
* @param int $id
306307
* @param array $skus
307-
* @return string|null
308+
* @return array
308309
*/
309-
private function retrieveSkuById($id, $skus)
310+
private function buildSkuByIdLookup($skus)
310311
{
312+
$lookup = [];
311313
foreach ($this->productIdLocator->retrieveProductIdsBySkus($skus) as $sku => $ids) {
312-
if (isset($ids[$id])) {
313-
return $sku;
314+
foreach (array_keys($ids) as $id) {
315+
$lookup[$id] = $sku;
314316
}
315317
}
316318

317-
return null;
319+
return $lookup;
318320
}
319321

320322
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ private function getCategoryAsArray($category, $currentCategory, $isParentActive
162162
'url' => $this->catalogCategory->getCategoryUrl($category),
163163
'has_active' => in_array((string)$category->getId(), explode('/', $currentCategory->getPath()), true),
164164
'is_active' => $category->getId() == $currentCategory->getId(),
165+
'is_category' => true,
165166
'is_parent_active' => $isParentActive
166167
];
167168
}

app/code/Magento/Catalog/Test/Unit/Model/ProductRepositoryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,6 @@ public function testSaveExistingWithMediaGalleryEntries()
13361336

13371337
$expectedResult = [
13381338
[
1339-
'value_id' => 5,
13401339
'value_id' => 5,
13411340
"label" => "new_label_text",
13421341
'file' => 'filename1',

app/code/Magento/Catalog/view/frontend/web/js/product/breadcrumbs.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ define([
1616
categoryUrlSuffix: '',
1717
useCategoryPathInUrl: false,
1818
product: '',
19+
categoryItemSelector: '.category-item',
1920
menuContainer: '[data-action="navigation"] > ul'
2021
},
2122

@@ -163,7 +164,10 @@ define([
163164
categoryMenuItem = null;
164165

165166
if (categoryUrl && menu.length) {
166-
categoryMenuItem = menu.find('a[href="' + categoryUrl + '"]');
167+
categoryMenuItem = menu.find(
168+
this.options.categoryItemSelector +
169+
' > a[href="' + categoryUrl + '"]'
170+
);
167171
}
168172

169173
return categoryMenuItem;

app/code/Magento/Paypal/etc/adminhtml/system.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
</group>
3333
<group id="other_payment_methods" translate="label" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
3434
<label>Other Payment Methods:</label>
35+
<attribute type="expanded">1</attribute>
3536
<fieldset_css>paypal-top-section payments-other-header</fieldset_css>
3637
<frontend_model>\Magento\Config\Block\System\Config\Form\Fieldset</frontend_model>
3738
</group>

app/code/Magento/ReleaseNotification/Ui/Renderer/NotificationRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private function buildFooter(array $footer)
174174
* correct HTML format.
175175
*
176176
* @param string $content
177-
* @returns string
177+
* @return string
178178
*/
179179
private function formatContentWithLinks($content)
180180
{

app/code/Magento/Theme/Block/Html/Topmenu.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ protected function _getMenuItemClasses(\Magento\Framework\Data\Tree\Node $item)
309309
$classes[] = 'level' . $item->getLevel();
310310
$classes[] = $item->getPositionClass();
311311

312+
if ($item->getIsCategory()) {
313+
$classes[] = 'category-item';
314+
}
315+
312316
if ($item->getIsFirst()) {
313317
$classes[] = 'first';
314318
}

app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,8 @@ define([
721721
* @param {Number} page - current page
722722
*/
723723
changePage: function (page) {
724+
this.clear();
725+
724726
if (page === 1 && !this.recordData().length) {
725727
return false;
726728
}
@@ -762,15 +764,13 @@ define([
762764
* Change page to next
763765
*/
764766
nextPage: function () {
765-
this.clear();
766767
this.currentPage(this.currentPage() + 1);
767768
},
768769

769770
/**
770771
* Change page to previous
771772
*/
772773
previousPage: function () {
773-
this.clear();
774774
this.currentPage(this.currentPage() - 1);
775775
},
776776

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
9+
<page name="AdminConfigPaymentMethodsPage" url="admin/system_config/edit/section/payment/" area="admin" module="Magento_Config">
10+
<section name="OtherPaymentsConfigSection"/>
11+
</page>
12+
</pages>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="OtherPaymentsConfigSection">
12+
<element name="expandedTab" type="button" selector="#payment_us_other_payment_methods-head.open"/>
13+
</section>
14+
</sections>

0 commit comments

Comments
 (0)