Skip to content

Commit 360f591

Browse files
committed
Merge remote-tracking branch 'upstream/2.3-develop' into MQE-1352
2 parents 1d9d47d + 73650a0 commit 360f591

File tree

493 files changed

+11969
-2597
lines changed

Some content is hidden

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

493 files changed

+11969
-2597
lines changed

app/code/Magento/AdminNotification/view/adminhtml/layout/default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
99
<body>
1010
<referenceContainer name="notifications">
11-
<uiComponent name="notification_area"/>
11+
<uiComponent name="notification_area" aclResource="Magento_AdminNotification::show_list"/>
1212
<block class="Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup"
1313
name="unread_system_messages"
1414
as="unread_system_messages"

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/RefreshStatistics.php

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

77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9-
class RefreshStatistics extends \Magento\Reports\Controller\Adminhtml\Report\Statistics
9+
use Magento\Framework\App\Action\HttpPostActionInterface;
10+
use Magento\Reports\Controller\Adminhtml\Report\Statistics;
11+
12+
/**
13+
* Refresh Dashboard statistics action.
14+
*/
15+
class RefreshStatistics extends Statistics implements HttpPostActionInterface
1016
{
1117
/**
1218
* @param \Magento\Backend\App\Action\Context $context
@@ -25,6 +31,8 @@ public function __construct(
2531
}
2632

2733
/**
34+
* Refresh statistics.
35+
*
2836
* @return \Magento\Backend\Model\View\Result\Redirect
2937
*/
3038
public function execute()

app/code/Magento/Backend/Controller/Adminhtml/System/Design/Save.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\System\Design;
88

9-
class Save extends \Magento\Backend\Controller\Adminhtml\System\Design
9+
use Magento\Framework\App\Action\HttpPostActionInterface;
10+
11+
/**
12+
* Save design action.
13+
*/
14+
class Save extends \Magento\Backend\Controller\Adminhtml\System\Design implements HttpPostActionInterface
1015
{
1116
/**
1217
* Filtering posted data. Converting localized data if needed
@@ -26,6 +31,8 @@ protected function _filterPostData($data)
2631
}
2732

2833
/**
34+
* Save design action.
35+
*
2936
* @return \Magento\Backend\Model\View\Result\Redirect
3037
*/
3138
public function execute()
@@ -54,10 +61,10 @@ public function execute()
5461
} catch (\Exception $e) {
5562
$this->messageManager->addErrorMessage($e->getMessage());
5663
$this->_objectManager->get(\Magento\Backend\Model\Session::class)->setDesignData($data);
57-
return $resultRedirect->setPath('adminhtml/*/', ['id' => $design->getId()]);
64+
return $resultRedirect->setPath('*/*/edit', ['id' => $design->getId()]);
5865
}
5966
}
6067

61-
return $resultRedirect->setPath('adminhtml/*/');
68+
return $resultRedirect->setPath('*/*/');
6269
}
6370
}

app/code/Magento/Braintree/Test/Mftf/ActionGroup/AdminOrderBraintreeFillActionGroup.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@
1919

2020
<!--Choose Master Card from drop-down list-->
2121
<switchToIFrame stepKey="switchToCardNumber" selector="{{NewOrderSection.cardFrame}}"/>
22+
<waitForElementVisible selector="{{NewOrderSection.creditCardNumber}}" stepKey="waitForFillCardNumber"/>
2223
<fillField stepKey="fillCardNumber" selector="{{NewOrderSection.creditCardNumber}}" userInput="{{PaymentAndShippingInfo.cardNumber}}"/>
23-
<waitForPageLoad stepKey="waitForFillCardNumber"/>
2424
<switchToIFrame stepKey="switchBackFromCard"/>
2525

2626
<!--Fill expire date-->
2727
<switchToIFrame stepKey="switchToExpirationMonth" selector="{{NewOrderSection.monthFrame}}"/>
28+
<waitForElementVisible selector="{{NewOrderSection.expirationMonth}}" stepKey="waitForFillMonth"/>
2829
<fillField stepKey="fillMonth" selector="{{NewOrderSection.expirationMonth}}" userInput="{{PaymentAndShippingInfo.month}}"/>
29-
<waitForPageLoad stepKey="waitForFillMonth"/>
3030
<switchToIFrame stepKey="switchBackFromMonth"/>
3131
<switchToIFrame stepKey="switchToExpirationYear" selector="{{NewOrderSection.yearFrame}}"/>
32+
<waitForElementVisible selector="{{NewOrderSection.expirationYear}}" stepKey="waitForFillYear"/>
3233
<fillField stepKey="fillYear" selector="{{NewOrderSection.expirationYear}}" userInput="{{PaymentAndShippingInfo.year}}"/>
33-
<waitForPageLoad stepKey="waitForFillYear"/>
3434
<switchToIFrame stepKey="switchBackFromYear"/>
3535

3636
<!--Fill CVW code-->
3737
<switchToIFrame stepKey="switchToCVV" selector="{{NewOrderSection.cvvFrame}}"/>
38+
<waitForElementVisible selector="{{NewOrderSection.cvv}}" stepKey="waitForFillCVV"/>
3839
<fillField stepKey="fillCVV" selector="{{NewOrderSection.cvv}}" userInput="{{PaymentAndShippingInfo.cvv}}"/>
39-
<wait stepKey="waitForFillCVV" time="1"/>
4040
<switchToIFrame stepKey="switchBackFromCVV"/>
4141
</actionGroup>
4242
</actionGroups>

app/code/Magento/Braintree/Test/Mftf/Test/CreateAnAdminOrderUsingBraintreePaymentTest1.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MAGETWO-93677"/>
1919
<group value="braintree"/>
20-
<skip>
21-
<issueId value="MC-13779"/>
22-
</skip>
2320
</annotations>
2421

2522

@@ -63,21 +60,25 @@
6360
<argument name="customer" value="Simple_US_Customer"/>
6461
</actionGroup>
6562

63+
<!--Add Product to Order-->
6664
<actionGroup ref="addSimpleProductToOrder" stepKey="addProduct">
6765
<argument name="product" value="_defaultProduct"/>
6866
</actionGroup>
6967

68+
<!--Fill Order Customer Information-->
7069
<actionGroup ref="fillOrderCustomerInformation" stepKey="fillCustomerAddress">
7170
<argument name="customer" value="Simple_US_Customer"/>
7271
<argument name="address" value="US_Address_TX"/>
7372
</actionGroup>
7473

74+
<!--Select Shipping-->
7575
<actionGroup ref="orderSelectFlatRateShipping" stepKey="selectFlatRateShipping"/>
76-
7776
<waitForPageLoad stepKey="waitForShippingToFinish"/>
7877

78+
<!--Pay with Braintree -->
7979
<actionGroup ref="useBraintreeForMasterCard" stepKey="selectCardWithBraintree"/>
8080

81+
<!--Submit Order-->
8182
<click stepKey="submitOrder" selector="{{NewOrderSection.submitOrder}}"/>
8283
<waitForPageLoad stepKey="waitForSaveConfig"/>
8384
<waitForElementVisible selector="{{NewOrderSection.successMessage}}" stepKey="waitForSuccessMessage"/>

app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ public function getChildren($item)
100100
}
101101

102102
/**
103+
* Check if item can be shipped separately
104+
*
103105
* @param mixed $item
104106
* @return bool
105107
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
@@ -136,6 +138,8 @@ public function isShipmentSeparately($item = null)
136138
}
137139

138140
/**
141+
* Check if child items calculated
142+
*
139143
* @param mixed $item
140144
* @return bool
141145
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
@@ -174,6 +178,8 @@ public function isChildCalculated($item = null)
174178
}
175179

176180
/**
181+
* Retrieve selection attributes values
182+
*
177183
* @param mixed $item
178184
* @return mixed|null
179185
*/
@@ -191,6 +197,8 @@ public function getSelectionAttributes($item)
191197
}
192198

193199
/**
200+
* Retrieve order item options array
201+
*
194202
* @return array
195203
*/
196204
public function getOrderOptions()
@@ -212,6 +220,8 @@ public function getOrderOptions()
212220
}
213221

214222
/**
223+
* Retrieve order item
224+
*
215225
* @return mixed
216226
*/
217227
public function getOrderItem()
@@ -223,6 +233,8 @@ public function getOrderItem()
223233
}
224234

225235
/**
236+
* Get html info for item
237+
*
226238
* @param mixed $item
227239
* @return string
228240
*/
@@ -245,6 +257,8 @@ public function getValueHtml($item)
245257
}
246258

247259
/**
260+
* Check if we can show price info for this item
261+
*
248262
* @param object $item
249263
* @return bool
250264
*/

app/code/Magento/Bundle/view/adminhtml/templates/sales/invoice/create/items/renderer.phtml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,17 @@
2828
<?php endif; ?>
2929

3030
<?php foreach ($items as $_item): ?>
31+
<?php
32+
$shipTogether = ($_item->getOrderItem()->getProductType() == \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE) ?
33+
!$_item->getOrderItem()->isShipSeparately() : !$_item->getOrderItem()->getParentItem()->isShipSeparately()
34+
?>
3135
<?php $block->setPriceDataObject($_item) ?>
3236
<?php if ($_item->getOrderItem()->getParentItem()): ?>
37+
<?php
38+
if ($shipTogether) {
39+
continue;
40+
}
41+
?>
3342
<?php $attributes = $block->getSelectionAttributes($_item) ?>
3443
<?php if ($_prevOptionId != $attributes['option_id']): ?>
3544
<tr>
@@ -60,14 +69,14 @@
6069
</td>
6170
<?php endif; ?>
6271
<td class="col-price">
63-
<?php if ($block->canShowPriceInfo($_item)): ?>
72+
<?php if ($block->canShowPriceInfo($_item) || $shipTogether): ?>
6473
<?= $block->getColumnHtml($_item, 'price') ?>
6574
<?php else: ?>
6675
&nbsp;
6776
<?php endif; ?>
6877
</td>
6978
<td class="col-qty">
70-
<?php if ($block->canShowPriceInfo($_item)): ?>
79+
<?php if ($block->canShowPriceInfo($_item) || $shipTogether): ?>
7180
<table class="qty-table">
7281
<tr>
7382
<th><?= /* @escapeNotVerified */ __('Ordered') ?></th>
@@ -116,7 +125,7 @@
116125
<?php endif; ?>
117126
</td>
118127
<td class="col-qty-invoice">
119-
<?php if ($block->canShowPriceInfo($_item)): ?>
128+
<?php if ($block->canShowPriceInfo($_item) || $shipTogether): ?>
120129
<?php if ($block->canEditQty()) : ?>
121130
<input type="text"
122131
class="input-text admin__control-text qty-input"

app/code/Magento/BundleGraphQl/Model/BundleProductTypeResolver.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@
88
namespace Magento\BundleGraphQl\Model;
99

1010
use Magento\Framework\GraphQl\Query\Resolver\TypeResolverInterface;
11+
use Magento\Bundle\Model\Product\Type as Type;
1112

1213
/**
13-
* {@inheritdoc}
14+
* @inheritdoc
1415
*/
1516
class BundleProductTypeResolver implements TypeResolverInterface
1617
{
18+
const BUNDLE_PRODUCT = 'BundleProduct';
19+
1720
/**
18-
* {@inheritdoc}
21+
* @inheritdoc
1922
*/
2023
public function resolveType(array $data) : string
2124
{
22-
if (isset($data['type_id']) && $data['type_id'] == 'bundle') {
23-
return 'BundleProduct';
25+
if (isset($data['type_id']) && $data['type_id'] == Type::TYPE_CODE) {
26+
return self::BUNDLE_PRODUCT;
2427
}
2528
return '';
2629
}

app/code/Magento/Catalog/Block/Adminhtml/Category/AbstractCategory.php

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public function getCategory()
6767
}
6868

6969
/**
70+
* Get category id
71+
*
7072
* @return int|string|null
7173
*/
7274
public function getCategoryId()
@@ -78,6 +80,8 @@ public function getCategoryId()
7880
}
7981

8082
/**
83+
* Get category name
84+
*
8185
* @return string
8286
*/
8387
public function getCategoryName()
@@ -86,6 +90,8 @@ public function getCategoryName()
8690
}
8791

8892
/**
93+
* Get category path
94+
*
8995
* @return mixed
9096
*/
9197
public function getCategoryPath()
@@ -97,6 +103,8 @@ public function getCategoryPath()
97103
}
98104

99105
/**
106+
* Check store root category
107+
*
100108
* @return bool
101109
*/
102110
public function hasStoreRootCategory()
@@ -109,6 +117,8 @@ public function hasStoreRootCategory()
109117
}
110118

111119
/**
120+
* Get store from request
121+
*
112122
* @return Store
113123
*/
114124
public function getStore()
@@ -118,6 +128,8 @@ public function getStore()
118128
}
119129

120130
/**
131+
* Get root category for tree
132+
*
121133
* @param mixed|null $parentNodeCategory
122134
* @param int $recursionLevel
123135
* @return Node|array|null
@@ -149,10 +161,11 @@ public function getRoot($parentNodeCategory = null, $recursionLevel = 3)
149161

150162
$root = $tree->getNodeById($rootId);
151163

152-
if ($root && $rootId != \Magento\Catalog\Model\Category::TREE_ROOT_ID) {
164+
if ($root) {
153165
$root->setIsVisible(true);
154-
} elseif ($root && $root->getId() == \Magento\Catalog\Model\Category::TREE_ROOT_ID) {
155-
$root->setName(__('Root'));
166+
if ($root->getId() == \Magento\Catalog\Model\Category::TREE_ROOT_ID) {
167+
$root->setName(__('Root'));
168+
}
156169
}
157170

158171
$this->_coreRegistry->register('root', $root);
@@ -162,6 +175,8 @@ public function getRoot($parentNodeCategory = null, $recursionLevel = 3)
162175
}
163176

164177
/**
178+
* Get Default Store Id
179+
*
165180
* @return int
166181
*/
167182
protected function _getDefaultStoreId()
@@ -170,6 +185,8 @@ protected function _getDefaultStoreId()
170185
}
171186

172187
/**
188+
* Get category collection
189+
*
173190
* @return \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
174191
*/
175192
public function getCategoryCollection()
@@ -227,6 +244,8 @@ public function getRootByIds($ids)
227244
}
228245

229246
/**
247+
* Get category node for tree
248+
*
230249
* @param mixed $parentNodeCategory
231250
* @param int $recursionLevel
232251
* @return Node
@@ -249,6 +268,8 @@ public function getNode($parentNodeCategory, $recursionLevel = 2)
249268
}
250269

251270
/**
271+
* Get category save url
272+
*
252273
* @param array $args
253274
* @return string
254275
*/
@@ -260,6 +281,8 @@ public function getSaveUrl(array $args = [])
260281
}
261282

262283
/**
284+
* Get category edit url
285+
*
263286
* @return string
264287
*/
265288
public function getEditUrl()

0 commit comments

Comments
 (0)