Skip to content

Commit fcbb2b9

Browse files
committed
Merge remote-tracking branch 'mainline/2.3-develop' into MAGETWO-97411
2 parents 11d55a9 + 2c31192 commit fcbb2b9

File tree

55 files changed

+474
-113
lines changed

Some content is hidden

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

55 files changed

+474
-113
lines changed

app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<element name="save" type="button" selector="#save" timeout="30"/>
1313
<element name="saveAndContinue" type="button" selector="button[id*=save_and_continue]" timeout="30"/>
1414
<element name="delete" type="button" selector="#delete" timeout="30"/>
15+
<element name="add" type="button" selector="#add" timeout="30"/>
1516
</section>
1617
</sections>

app/code/Magento/Backend/view/adminhtml/templates/widget/tabshoriz.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<?php $_tabType = (!preg_match('/\s?ajax\s?/', $_tabClass) && $block->getTabUrl($_tab) != '#') ? 'link' : '' ?>
1919
<?php $_tabHref = $block->getTabUrl($_tab) == '#' ? '#' . $block->getTabId($_tab) . '_content' : $block->getTabUrl($_tab) ?>
2020
<li>
21-
<a href="<?= /* @escapeNotVerified */ $_tabHref ?>" id="<?= /* @escapeNotVerified */ $block->getTabId($_tab) ?>" title="<?= /* @escapeNotVerified */ $block->getTabTitle($_tab) ?>" class="<?php $_tabClass ?>" data-tab-type="<?php $_tabType ?>">
21+
<a href="<?= $block->escapeHtmlAttr($_tabHref) ?>" id="<?= $block->escapeHtmlAttr($block->getTabId($_tab)) ?>" title="<?= $block->escapeHtmlAttr($block->getTabTitle($_tab)) ?>" class="<?= $block->escapeHtmlAttr($_tabClass) ?>" data-tab-type="<?= $block->escapeHtmlAttr($_tabType) ?>">
2222
<span>
2323
<span class="changed" title="<?= /* @escapeNotVerified */ __('The information in this tab has been changed.') ?>"></span>
2424
<span class="error" title="<?= /* @escapeNotVerified */ __('This tab contains invalid data. Please resolve this before saving.') ?>"></span>

app/code/Magento/Bundle/Test/Mftf/ActionGroup/EnableDisableProductActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/>
1515

1616
<!--Trigger SEO drop down-->
17-
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.seoDependent}}" visible="false" stepKey="OpenDropDownIfClosed"/>
17+
<scrollTo selector="{{AdminProductFormBundleSection.seoDropdown}}" stepKey="moveToSEOSection"/>
18+
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.urlKey}}" visible="false" stepKey="openDropDownIfClosed"/>
1819
<waitForPageLoad stepKey="WaitForDropDownSEO"/>
1920

2021
<!--Fill URL input-->

app/code/Magento/Bundle/Test/Mftf/Test/AdminMassDeleteBundleProducts.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@
9999
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku2}}" stepKey="fillProductSku2"/>
100100

101101
<!--Trigger SEO drop down-->
102-
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.seoDependent}}" visible="false" stepKey="OpenDropDownIfClosed2"/>
103-
<waitForPageLoad stepKey="WaitForDropDownSEO"/>
102+
<scrollTo selector="{{AdminProductFormBundleSection.seoDropdown}}" stepKey="moveToSEOSection"/>
103+
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.urlKey}}" visible="false" stepKey="openDropDownIfClosed"/>
104104

105105
<!--Fill URL input-->
106106
<fillField userInput="{{BundleProduct.urlKey2}}" selector="{{AdminProductFormBundleSection.urlKey}}" stepKey="FillsinSEOlinkExtension2"/>

app/code/Magento/Bundle/Test/Mftf/Test/MassEnableDisableBundleProductsTest.xml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,7 @@
6060
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/>
6161
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/>
6262

63-
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
64-
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/>
65-
66-
<!--Trigger SEO drop down-->
67-
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.seoDependent}}" visible="false" stepKey="OpenDropDownIfClosed"/>
68-
<waitForPageLoad stepKey="WaitForDropDownSEO"/>
69-
70-
<!--Fill URL input-->
71-
<fillField userInput="{{BundleProduct.urlKey}}" selector="{{AdminProductFormBundleSection.urlKey}}" stepKey="FillsinSEOlinkExtension"/>
63+
<actionGroup ref="AncillaryPrepBundleProduct" stepKey="createBundledProductForTwoSimpleProducts"/>
7264

7365
<!--Save the product-->
7466
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton"/>
@@ -104,7 +96,8 @@
10496
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku2}}" stepKey="fillProductSku2"/>
10597

10698
<!--Trigger SEO drop down-->
107-
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.seoDependent}}" visible="false" stepKey="OpenDropDownIfClosed2"/>
99+
<scrollTo selector="{{AdminProductFormBundleSection.seoDropdown}}" stepKey="moveToSEOSection"/>
100+
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.urlKey}}" visible="false" stepKey="openDropDownIfClosed"/>
108101
<waitForPageLoad stepKey="WaitForDropDownSEO2"/>
109102

110103
<!--Fill URL input-->
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\Catalog\Block\Product\View;
10+
11+
/**
12+
* Product details block.
13+
*
14+
* Holds a group of blocks to show as tabs.
15+
*
16+
* @api
17+
*/
18+
class Details extends \Magento\Framework\View\Element\Template
19+
{
20+
/**
21+
* Get sorted child block names.
22+
*
23+
* @param string $groupName
24+
* @param string $callback
25+
* @throws \Magento\Framework\Exception\LocalizedException
26+
*
27+
* @return array
28+
*/
29+
public function getGroupSortedChildNames(string $groupName, string $callback): array
30+
{
31+
$groupChildNames = $this->getGroupChildNames($groupName, $callback);
32+
$layout = $this->getLayout();
33+
34+
$childNamesSortOrder = [];
35+
36+
foreach ($groupChildNames as $childName) {
37+
$alias = $layout->getElementAlias($childName);
38+
$sortOrder = (int)$this->getChildData($alias, 'sort_order') ?? 0;
39+
40+
$childNamesSortOrder[$sortOrder] = $childName;
41+
}
42+
43+
ksort($childNamesSortOrder, SORT_NUMERIC);
44+
45+
return $childNamesSortOrder;
46+
}
47+
}

app/code/Magento/Catalog/Model/Product/Option/Type/Select.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function validateUserValue($values)
7171
}
7272
if (!$this->_isSingleSelection()) {
7373
$valuesCollection = $option->getOptionValuesByOptionId($value, $this->getProduct()->getStoreId())->load();
74-
$valueCount = is_array($value) ? count($value) : 1;
74+
$valueCount = is_array($value) ? count($value) : 0;
7575
if ($valuesCollection->count() != $valueCount) {
7676
$this->setIsValid(false);
7777
throw new LocalizedException(

app/code/Magento/Catalog/view/frontend/layout/catalog_product_view.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,21 @@
136136
</arguments>
137137
</block>
138138
</container>
139-
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.details" template="Magento_Catalog::product/view/details.phtml" after="product.info.media">
139+
<block class="Magento\Catalog\Block\Product\View\Details" name="product.info.details" template="Magento_Catalog::product/view/details.phtml" after="product.info.media">
140140
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" as="description" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
141141
<arguments>
142142
<argument name="at_call" xsi:type="string">getDescription</argument>
143143
<argument name="at_code" xsi:type="string">description</argument>
144144
<argument name="css_class" xsi:type="string">description</argument>
145145
<argument name="at_label" xsi:type="string">none</argument>
146146
<argument name="title" translate="true" xsi:type="string">Details</argument>
147+
<argument name="sort_order" xsi:type="string">10</argument>
147148
</arguments>
148149
</block>
149150
<block class="Magento\Catalog\Block\Product\View\Attributes" name="product.attributes" as="additional" template="Magento_Catalog::product/view/attributes.phtml" group="detailed_info">
150151
<arguments>
151152
<argument translate="true" name="title" xsi:type="string">More Information</argument>
153+
<argument name="sort_order" xsi:type="string">20</argument>
152154
</arguments>
153155
</block>
154156
</block>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
// @codingStandardsIgnoreFile
88

9+
/** @var \Magento\Catalog\Block\Product\View\Details $block */
910
?>
10-
<?php if ($detailedInfoGroup = $block->getGroupChildNames('detailed_info', 'getChildHtml')):?>
11+
<?php if ($detailedInfoGroup = $block->getGroupSortedChildNames('detailed_info', 'getChildHtml')):?>
1112
<div class="product info detailed">
1213
<?php $layout = $block->getLayout(); ?>
1314
<div class="product data items" data-mage-init='{"tabs":{"openedState":"active"}}'>

app/code/Magento/ConfigurableProduct/view/adminhtml/web/js/components/price-configurable.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ define([
5353
if (isConfigurable) {
5454
this.disable();
5555
this.clear();
56+
} else {
57+
this.enable();
5658
}
5759
}
5860
});

0 commit comments

Comments
 (0)