Skip to content

Commit 4046856

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #14210: [Forwardport] Inconsistent Redirect in Admin Notification Controller (by @dimonovp) - #14209: [Forwardport] Invoice grid shows wrong subtotal for partial items invoice. It shows order's subtotal instead if invoiced item's subtotal (by @AlexWorking) - #14207: [Forwardport] Make scope parameters of methods to save/delete config optional (by @mastiuhin-olexandr) - #14205: [Forwardport] Allow changing head and body element through xml layout updates (by @dimonovp) - #14204: [Forwardport] resolved default country selection issue while creating new customer � #5 (by @rostyslav-hymon) - #14203: [Forwardport] Use event object in 'ajax:addToCart' trigger when adding a product to the cart (by @mastiuhin-olexandr) - #14199: [Forwardport] Issue-13768 Fixed error messages on admin user account page after redirect for force password change (by @dimonovp) - #14194: [Forwardport] [FIX] small refactoring and removing not using variable from templates (by @mastiuhin-olexandr) - #14192: [Forwardport] #13820: IE11 minicart not updating on configurable pr� (by @mastiuhin-olexandr) - #14191: [Forwardport] Removed unnecessary protected member variables. (by @dimonovp) - #14190: [Forwardport] Modify Report processor to return 500 (by @AlexWorking) - #14185: [Forwardport] Added missing event parameter for proxy function on the search form submit (by @dimonovp) - #14184: [Forwardport] Add @api annotation to block argument marker interface (by @dimonovp) - #14214: [Forwardport] Fix $useCache for container child blocks (by @rostyslav-hymon) - #14212: [Forwardport] Fix typo in securityCheckers array (by @AlexWorking) - #14215: [Forwardport] #13899 Solve Canada Zip Code pattern (by @AlexWorking) - #14216: [Forwardport] Fix cache issue for currencies with no symbol (by @dimonovp) - #14213: [Forwardport] Added alias to block 'product.info.description' (by @mastiuhin-olexandr) Fixed GitHub Issues: - #13804: Invoice grid shows wrong subtotal for partial items invoice. It shows order's subtotal instead if invoiced item's subtotal (reported by @ankurvr) has been fixed in #14209 by @AlexWorking in 2.3-develop branch Related commits: 1. 0bfc3e1 - #4454: CMS Page with <head> in layout update xml (reported by @zhiyicai) has been fixed in #14205 by @dimonovp in 2.3-develop branch Related commits: 1. 822c6e9 - #3483: Default country selection issue while creating new customer from backend (reported by @keyurshah070) has been fixed in #14204 by @rostyslav-hymon in 2.3-develop branch Related commits: 1. 255b682 2. e37ae24 - #13768: Expired backend password - Attention: Something went wrong (reported by @janssensjelle) has been fixed in #14199 by @dimonovp in 2.3-develop branch Related commits: 1. 4df41e1 - #13820: IE11 minicart not updating on configurable product page (ES6) (reported by @Pumppa) has been fixed in #14192 by @mastiuhin-olexandr in 2.3-develop branch Related commits: 1. 6d4065a - #11512: Incorrect use of 503 status code (reported by @andrewhowdencom) has been fixed in #14190 by @AlexWorking in 2.3-develop branch Related commits: 1. 72c502f - #13791: Submitting search form (mini) with empty value throws error on preventDefault (reported by @koenner01) has been fixed in #14185 by @dimonovp in 2.3-develop branch Related commits: 1. 808487b - #13899: Postal code (zip code) for Canada should allow postal codes without space (reported by @sl02) has been fixed in #14215 by @AlexWorking in 2.3-develop branch Related commits: 1. c87b104 2. ac37727 3. bda63c7 4. cb04f93
2 parents 29df97d + 4d5e8fc commit 4046856

File tree

27 files changed

+170
-32
lines changed

27 files changed

+170
-32
lines changed

app/code/Magento/AdminNotification/Controller/Adminhtml/Notification/MassRemove.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ public function execute()
3939
$this->messageManager->addException($e, __("We couldn't remove the messages because of an error."));
4040
}
4141
}
42-
$this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*')));
42+
$this->_redirect('adminhtml/*/');
4343
}
4444
}

app/code/Magento/Catalog/Block/Product/Image.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,19 @@
2020
class Image extends \Magento\Framework\View\Element\Template
2121
{
2222
/**
23+
* @deprecated Property isn't used
2324
* @var \Magento\Catalog\Helper\Image
2425
*/
2526
protected $imageHelper;
2627

2728
/**
29+
* @deprecated Property isn't used
2830
* @var \Magento\Catalog\Model\Product
2931
*/
3032
protected $product;
3133

3234
/**
35+
* @deprecated Property isn't used
3336
* @var array
3437
*/
3538
protected $attributes = [];

app/code/Magento/Catalog/view/base/templates/product/price/default.phtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
<?php
1212
/** @var \Magento\Catalog\Pricing\Render\FinalPriceBox $block */
1313

14-
$productId = $block->getSaleableItem()->getId();
15-
1614
/** ex: \Magento\Catalog\Pricing\Price\RegularPrice */
1715
/** @var \Magento\Framework\Pricing\Price\PriceInterface $priceModel */
1816
$priceModel = $block->getPriceType('regular_price');

app/code/Magento/Catalog/view/base/templates/product/price/final_price.phtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
<?php
1212
/** @var \Magento\Catalog\Pricing\Render\FinalPriceBox $block */
1313

14-
$productId = $block->getSaleableItem()->getId();
15-
1614
/** ex: \Magento\Catalog\Pricing\Price\RegularPrice */
1715
/** @var \Magento\Framework\Pricing\Price\PriceInterface $priceModel */
1816
$priceModel = $block->getPriceType('regular_price');

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
</block>
131131
</container>
132132
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.details" template="Magento_Catalog::product/view/details.phtml" after="product.info.media">
133-
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
133+
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" as="description" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
134134
<arguments>
135135
<argument name="at_call" xsi:type="string">getDescription</argument>
136136
<argument name="at_code" xsi:type="string">description</argument>

app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ define([
9797
success: function (res) {
9898
var eventData, parameters;
9999

100-
$(document).trigger('ajax:addToCart', form.data().productSku, form, res);
100+
$(document).trigger('ajax:addToCart', {
101+
'sku': form.data().productSku,
102+
'form': form,
103+
'response': res
104+
});
101105

102106
if (self.isLoaderEnabled()) {
103107
$('body').trigger(self.options.processStop);

app/code/Magento/Config/Model/ResourceModel/Config.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Config\Model\ResourceModel;
77

8+
use Magento\Framework\App\Config\ScopeConfigInterface;
9+
810
/**
911
* Core Resource Resource Model
1012
*
@@ -34,7 +36,7 @@ protected function _construct()
3436
* @param int $scopeId
3537
* @return $this
3638
*/
37-
public function saveConfig($path, $value, $scope, $scopeId)
39+
public function saveConfig($path, $value, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = 0)
3840
{
3941
$connection = $this->getConnection();
4042
$select = $connection->select()->from(
@@ -70,7 +72,7 @@ public function saveConfig($path, $value, $scope, $scopeId)
7072
* @param int $scopeId
7173
* @return $this
7274
*/
73-
public function deleteConfig($path, $scope, $scopeId)
75+
public function deleteConfig($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = 0)
7476
{
7577
$connection = $this->getConnection();
7678
$connection->delete(

app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function __construct(
126126
public function getCacheKeyInfo()
127127
{
128128
$parentData = parent::getCacheKeyInfo();
129-
$parentData[] = $this->priceCurrency->getCurrencySymbol();
129+
$parentData[] = $this->priceCurrency->getCurrency()->getCode();
130130
$parentData[] = $this->customerSession->getCustomerGroupId();
131131
return $parentData;
132132
}

app/code/Magento/ConfigurableProduct/Test/Unit/Block/Product/View/Type/ConfigurableTest.php

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ class ConfigurableTest extends \PHPUnit\Framework\TestCase
4848
*/
4949
private $priceCurrency;
5050

51+
/**
52+
* @var \Magento\Directory\Model\Currency|\PHPUnit_Framework_MockObject_MockObject
53+
*/
54+
private $currency;
55+
5156
/**
5257
* @var \Magento\ConfigurableProduct\Model\ConfigurableAttributeData|\PHPUnit_Framework_MockObject_MockObject
5358
*/
@@ -122,6 +127,9 @@ protected function setUp()
122127
$this->context->expects($this->once())
123128
->method('getResolver')
124129
->willReturn($fileResolverMock);
130+
$this->currency = $this->getMockBuilder(\Magento\Directory\Model\Currency::class)
131+
->disableOriginalConstructor()
132+
->getMock();
125133
$this->configurableAttributeData = $this->getMockBuilder(
126134
\Magento\ConfigurableProduct\Model\ConfigurableAttributeData::class
127135
)
@@ -192,10 +200,10 @@ public function cacheKeyProvider() : array
192200
2 => null,
193201
'base_url' => null,
194202
'template' => null,
195-
3 => '$',
203+
3 => 'USD',
196204
4 => null,
197205
],
198-
'$',
206+
'USD',
199207
null,
200208
]
201209
];
@@ -223,7 +231,10 @@ public function testGetCacheKeyInfo(array $expected, string $priceCurrency = nul
223231
->method('getStore')
224232
->willReturn($storeMock);
225233
$this->priceCurrency->expects($this->once())
226-
->method('getCurrencySymbol')
234+
->method('getCurrency')
235+
->willReturn($this->currency);
236+
$this->currency->expects($this->once())
237+
->method('getCode')
227238
->willReturn($priceCurrency);
228239
$this->customerSession->expects($this->once())
229240
->method('getCustomerGroupId')

app/code/Magento/ConfigurableProduct/view/frontend/web/js/options-updater.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
define([
22
'jquery',
3+
'underscore',
34
'Magento_Customer/js/customer-data'
4-
], function ($, customerData) {
5+
], function ($, _, customerData) {
56
'use strict';
67

78
var selectors = {
@@ -23,7 +24,7 @@ define([
2324
if (!(data && data.items && data.items.length && productId)) {
2425
return false;
2526
}
26-
changedProductOptions = data.items.find(function (item) {
27+
changedProductOptions = _.find(data.items, function (item) {
2728
return item['product_id'] === productId;
2829
});
2930
changedProductOptions = changedProductOptions && changedProductOptions.options &&

0 commit comments

Comments
 (0)