Skip to content

Commit 8f737c0

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #20391: Success message is not showing when creating invoice & shipment simultaniously #19942 (by @XxXgeoXxX) - #21498: Setting default sorting #21493 (by @Jitheesh) - #21534: correct spelling (by @ravi-chandra3197) - #21536: Fix type hints and replace deprecated method usage (by @avstudnitz) - #21509: Fix: Cart is emptied when enter is pressed after changing product quantity (by @lfluvisotto) - #20528: Fix for #20527 [Admin] Configurable product variations table cell labels wrong position (by @vasilii-b) - #19376: 19276 - Fixed price renderer issue (by @sarfarazbheda) Fixed GitHub Issues: - #21493: Setting default sorting (reported by @iproger) has been fixed in #21498 by @Jitheesh in 2.3-develop branch Related commits: 1. 50647c4 - #21499: Cart is emptied when enter is pressed after changing product quantity (reported by @wojtekn) has been fixed in #21509 by @lfluvisotto in 2.3-develop branch Related commits: 1. 539766f 2. fd3344b - #20527: [Admin] Configurable product variations table cell labels wrong position (reported by @vasilii-b) has been fixed in #20528 by @vasilii-b in 2.3-develop branch Related commits: 1. af11e87 2. ed2a80c 3. d9c962f 4. e8adeca - #19276: Change different product price on selecting different product swatches on category pages (reported by @ankurverma5540) has been fixed in #19376 by @sarfarazbheda in 2.3-develop branch Related commits: 1. 6c5dd94
2 parents e457037 + 8358e50 commit 8f737c0

File tree

23 files changed

+112
-57
lines changed

23 files changed

+112
-57
lines changed

app/code/Magento/Catalog/Api/ProductRenderListInterface.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
78
namespace Magento\Catalog\Api;
89

910
/**
10-
* Interface which provides product renders information for products
11+
* Interface which provides product renders information for products.
12+
*
1113
* @api
1214
* @since 101.1.0
1315
*/
1416
interface ProductRenderListInterface
1517
{
1618
/**
17-
* Collect and retrieve the list of product render info
18-
* This info contains raw prices and formated prices, product name, stock status, store_id, etc
19+
* Collect and retrieve the list of product render info.
20+
*
21+
* This info contains raw prices and formatted prices, product name, stock status, store_id, etc.
22+
*
1923
* @see \Magento\Catalog\Api\Data\ProductRenderInfoDtoInterface
2024
*
2125
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria

app/code/Magento/Catalog/Block/Product/View/Options/AbstractOptions.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
*
1010
* @author Magento Core Team <core@magentocommerce.com>
1111
*/
12+
1213
namespace Magento\Catalog\Block\Product\View\Options;
1314

1415
use Magento\Catalog\Pricing\Price\CustomOptionPriceInterface;
1516

1617
/**
18+
* Product aoptions section abstract block.
19+
*
1720
* @api
1821
* @since 100.0.2
1922
*/
@@ -46,7 +49,7 @@ abstract class AbstractOptions extends \Magento\Framework\View\Element\Template
4649
/**
4750
* @param \Magento\Framework\View\Element\Template\Context $context
4851
* @param \Magento\Framework\Pricing\Helper\Data $pricingHelper
49-
* @param \Magento\Catalog\Helper\Data $catalogData,
52+
* @param \Magento\Catalog\Helper\Data $catalogData
5053
* @param array $data
5154
*/
5255
public function __construct(
@@ -123,6 +126,8 @@ public function getFormattedPrice()
123126
}
124127

125128
/**
129+
* Retrieve formatted price.
130+
*
126131
* @return string
127132
*
128133
* @deprecated
@@ -134,7 +139,7 @@ public function getFormatedPrice()
134139
}
135140

136141
/**
137-
* Return formated price
142+
* Return formatted price
138143
*
139144
* @param array $value
140145
* @param bool $flag

app/code/Magento/Checkout/Block/Cart/Totals.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Checkout\Block\Cart;
78

89
use Magento\Framework\View\Element\BlockInterface;
910
use Magento\Checkout\Block\Checkout\LayoutProcessorInterface;
1011

1112
/**
13+
* Totals cart block.
14+
*
1215
* @api
1316
*/
1417
class Totals extends \Magento\Checkout\Block\Cart\AbstractCart
@@ -62,6 +65,8 @@ public function __construct(
6265
}
6366

6467
/**
68+
* Retrieve encoded js layout.
69+
*
6570
* @return string
6671
*/
6772
public function getJsLayout()
@@ -74,6 +79,8 @@ public function getJsLayout()
7479
}
7580

7681
/**
82+
* Retrieve totals from cache.
83+
*
7784
* @return array
7885
*/
7986
public function getTotals()
@@ -85,6 +92,8 @@ public function getTotals()
8592
}
8693

8794
/**
95+
* Set totals to cache.
96+
*
8897
* @param array $value
8998
* @return $this
9099
* @codeCoverageIgnore
@@ -96,6 +105,8 @@ public function setTotals($value)
96105
}
97106

98107
/**
108+
* Create totals block and set totals.
109+
*
99110
* @param string $code
100111
* @return BlockInterface
101112
*/
@@ -121,6 +132,8 @@ protected function _getTotalRenderer($code)
121132
}
122133

123134
/**
135+
* Get totals html.
136+
*
124137
* @param mixed $total
125138
* @param int|null $area
126139
* @param int $colspan
@@ -177,7 +190,7 @@ public function needDisplayBaseGrandtotal()
177190
}
178191

179192
/**
180-
* Get formated in base currency base grand total value
193+
* Get formatted in base currency base grand total value
181194
*
182195
* @return string
183196
*/

app/code/Magento/Checkout/view/frontend/web/js/shopping-cart.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ define([
1414
_create: function () {
1515
var items, i, reload;
1616

17-
$(this.options.emptyCartButton).on('click', $.proxy(function () {
17+
$(this.options.emptyCartButton).on('click', $.proxy(function (event) {
18+
if (event.detail === 0) {
19+
return;
20+
}
21+
1822
$(this.options.emptyCartButton).attr('name', 'update_cart_action_temp');
1923
$(this.options.updateCartActionContainer)
2024
.attr('name', 'update_cart_action').attr('value', 'empty_cart');

app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/ConfigurablePanel.php

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
*/
66
namespace Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier;
77

8+
use Magento\Catalog\Model\Locator\LocatorInterface;
89
use Magento\Catalog\Model\Product\Attribute\Backend\Sku;
910
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
11+
use Magento\Framework\UrlInterface;
1012
use Magento\Ui\Component\Container;
11-
use Magento\Ui\Component\Form;
1213
use Magento\Ui\Component\DynamicRows;
14+
use Magento\Ui\Component\Form;
1315
use Magento\Ui\Component\Modal;
14-
use Magento\Framework\UrlInterface;
15-
use Magento\Catalog\Model\Locator\LocatorInterface;
1616

1717
/**
1818
* Data provider for Configurable panel
@@ -90,15 +90,15 @@ public function __construct(
9090
}
9191

9292
/**
93-
* {@inheritdoc}
93+
* @inheritdoc
9494
*/
9595
public function modifyData(array $data)
9696
{
9797
return $data;
9898
}
9999

100100
/**
101-
* {@inheritdoc}
101+
* @inheritdoc
102102
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
103103
*/
104104
public function modifyMeta(array $meta)
@@ -197,7 +197,7 @@ public function modifyMeta(array $meta)
197197
'autoRender' => false,
198198
'componentType' => 'insertListing',
199199
'component' => 'Magento_ConfigurableProduct/js'
200-
.'/components/associated-product-insert-listing',
200+
. '/components/associated-product-insert-listing',
201201
'dataScope' => $this->associatedListingPrefix
202202
. static::ASSOCIATED_PRODUCT_LISTING,
203203
'externalProvider' => $this->associatedListingPrefix
@@ -328,14 +328,12 @@ protected function getButtonSet()
328328
'component' => 'Magento_Ui/js/form/components/button',
329329
'actions' => [
330330
[
331-
'targetName' =>
332-
$this->dataScopeName . '.configurableModal',
331+
'targetName' => $this->dataScopeName . '.configurableModal',
333332
'actionName' => 'trigger',
334333
'params' => ['active', true],
335334
],
336335
[
337-
'targetName' =>
338-
$this->dataScopeName . '.configurableModal',
336+
'targetName' => $this->dataScopeName . '.configurableModal',
339337
'actionName' => 'openModal',
340338
],
341339
],
@@ -471,8 +469,7 @@ protected function getRows()
471469
'sku',
472470
__('SKU'),
473471
[
474-
'validation' =>
475-
[
472+
'validation' => [
476473
'required-entry' => true,
477474
'max_text_length' => Sku::SKU_MAX_LENGTH,
478475
],
@@ -577,6 +574,7 @@ protected function getColumn(
577574
'dataType' => Form\Element\DataType\Text::NAME,
578575
'dataScope' => $name,
579576
'visibleIfCanEdit' => false,
577+
'labelVisible' => false,
580578
'imports' => [
581579
'visible' => '!${$.provider}:${$.parentScope}.canEdit'
582580
],
@@ -595,6 +593,7 @@ protected function getColumn(
595593
'component' => 'Magento_Ui/js/form/components/group',
596594
'label' => $label,
597595
'dataScope' => '',
596+
'showLabel' => false
598597
];
599598
$container['children'] = [
600599
$name . '_edit' => $fieldEdit,

app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/Orders.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ protected function _construct()
6363
{
6464
parent::_construct();
6565
$this->setId('customer_orders_grid');
66-
$this->setDefaultSort('created_at', 'desc');
66+
$this->setDefaultSort('created_at');
67+
$this->setDefaultDir('desc');
6768
$this->setUseAjax(true);
6869
}
6970

app/code/Magento/Customer/Block/Adminhtml/Edit/Tab/View/Cart.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ protected function _construct()
7777
{
7878
parent::_construct();
7979
$this->setId('customer_view_cart_grid');
80-
$this->setDefaultSort('added_at', 'desc');
80+
$this->setDefaultSort('added_at');
81+
$this->setDefaultDir('desc');
8182
$this->setSortable(false);
8283
$this->setPagerVisibility(false);
8384
$this->setFilterVisibility(false);

app/code/Magento/Customer/Model/Attribute/Data/Postcode.php

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

89
use Magento\Directory\Helper\Data as DirectoryHelper;
@@ -13,7 +14,8 @@
1314
use Magento\Framework\Stdlib\DateTime\TimezoneInterface as MagentoTimezone;
1415

1516
/**
16-
* Customer Address Postal/Zip Code Attribute Data Model
17+
* Customer Address Postal/Zip Code Attribute Data Model.
18+
*
1719
* This Data Model Has to Be Set Up in additional EAV attribute table
1820
*/
1921
class Postcode extends \Magento\Eav\Model\Attribute\Data\AbstractData
@@ -40,7 +42,8 @@ public function __construct(
4042
}
4143

4244
/**
43-
* Validate postal/zip code
45+
* Validate postal/zip code.
46+
*
4447
* Return true and skip validation if country zip code is optional
4548
*
4649
* @param array|string $value
@@ -104,7 +107,7 @@ public function restoreValue($value)
104107
}
105108

106109
/**
107-
* Return formated attribute value from entity model
110+
* Return formatted attribute value from entity model
108111
*
109112
* @param string $format
110113
* @return string|array

app/code/Magento/Newsletter/Controller/Subscriber/Confirm.php

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
78
namespace Magento\Newsletter\Controller\Subscriber;
89

9-
class Confirm extends \Magento\Newsletter\Controller\Subscriber
10+
use Magento\Framework\App\Action\HttpGetActionInterface;
11+
12+
/**
13+
* Confirm subscription controller.
14+
*/
15+
class Confirm extends \Magento\Newsletter\Controller\Subscriber implements HttpGetActionInterface
1016
{
1117
/**
12-
* Subscription confirm action
13-
* @return void
18+
* Subscription confirm action.
19+
*
20+
* @return \Magento\Framework\Controller\Result\Redirect
1421
*/
1522
public function execute()
1623
{
@@ -23,17 +30,17 @@ public function execute()
2330

2431
if ($subscriber->getId() && $subscriber->getCode()) {
2532
if ($subscriber->confirm($code)) {
26-
$this->messageManager->addSuccess(__('Your subscription has been confirmed.'));
33+
$this->messageManager->addSuccessMessage(__('Your subscription has been confirmed.'));
2734
} else {
28-
$this->messageManager->addError(__('This is an invalid subscription confirmation code.'));
35+
$this->messageManager->addErrorMessage(__('This is an invalid subscription confirmation code.'));
2936
}
3037
} else {
31-
$this->messageManager->addError(__('This is an invalid subscription ID.'));
38+
$this->messageManager->addErrorMessage(__('This is an invalid subscription ID.'));
3239
}
3340
}
34-
35-
$resultRedirect = $this->resultRedirectFactory->create();
36-
$resultRedirect->setUrl($this->_storeManager->getStore()->getBaseUrl());
37-
return $resultRedirect;
41+
/** @var \Magento\Framework\Controller\Result\Redirect $redirect */
42+
$redirect = $this->resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT);
43+
$redirectUrl = $this->_storeManager->getStore()->getBaseUrl();
44+
return $redirect->setUrl($redirectUrl);
3845
}
3946
}

app/code/Magento/Newsletter/Controller/Subscriber/NewAction.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
78
namespace Magento\Newsletter\Controller\Subscriber;
89

910
use Magento\Customer\Api\AccountManagementInterface as CustomerAccountManagement;
@@ -131,7 +132,7 @@ protected function validateEmailFormat($email)
131132
/**
132133
* New subscription action
133134
*
134-
* @return void
135+
* @return \Magento\Framework\Controller\Result\Redirect
135136
*/
136137
public function execute()
137138
{
@@ -160,7 +161,10 @@ public function execute()
160161
$this->messageManager->addExceptionMessage($e, __('Something went wrong with the subscription.'));
161162
}
162163
}
163-
$this->getResponse()->setRedirect($this->_redirect->getRedirectUrl());
164+
/** @var \Magento\Framework\Controller\Result\Redirect $redirect */
165+
$redirect = $this->resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT);
166+
$redirectUrl = $this->_redirect->getRedirectUrl();
167+
return $redirect->setUrl($redirectUrl);
164168
}
165169

166170
/**

0 commit comments

Comments
 (0)