Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 0500320

Browse files
author
Magento CICD
authored
merge magento/2.3-develop into magento-engcom/async-webapi-1
2 parents 65a1f8c + 4046856 commit 0500320

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)