Skip to content

Commit a842b18

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into MC-18477
2 parents 81d81cb + e50fe6f commit a842b18

File tree

194 files changed

+20361
-537
lines changed

Some content is hidden

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

194 files changed

+20361
-537
lines changed

app/code/Magento/AuthorizenetGraphQl/Model/AuthorizenetDataProvider.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Magento\Framework\Stdlib\ArrayManager;
1212

1313
/**
14-
* DataProvider Model for Authorizenet
14+
* SetPaymentMethod additional data provider model for Authorizenet payment method
1515
*/
1616
class AuthorizenetDataProvider implements AdditionalDataProviderInterface
1717
{
@@ -23,7 +23,6 @@ class AuthorizenetDataProvider implements AdditionalDataProviderInterface
2323
private $arrayManager;
2424

2525
/**
26-
* AuthorizenetDataProvider constructor.
2726
* @param ArrayManager $arrayManager
2827
*/
2928
public function __construct(
@@ -42,19 +41,19 @@ public function getData(array $data): array
4241
{
4342
$additionalData = $this->arrayManager->get(static::PATH_ADDITIONAL_DATA, $data) ?? [];
4443
foreach ($additionalData as $key => $value) {
45-
$additionalData[$this->snakeCaseToCamelCase($key)] = $value;
44+
$additionalData[$this->convertSnakeCaseToCamelCase($key)] = $value;
4645
unset($additionalData[$key]);
4746
}
4847
return $additionalData;
4948
}
5049

5150
/**
52-
* Converts an input string from snake_case to camelCase.
51+
* Convert an input string from snake_case to camelCase.
5352
*
5453
* @param string $input
5554
* @return string
5655
*/
57-
private function snakeCaseToCamelCase($input)
56+
private function convertSnakeCaseToCamelCase($input): string
5857
{
5958
return lcfirst(str_replace('_', '', ucwords($input, '_')));
6059
}

app/code/Magento/Bundle/view/frontend/web/js/float.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
define([
1111
'jquery',
12-
'jquery/ui'
12+
'jquery-ui-modules/widget'
1313
], function ($) {
1414
'use strict';
1515

app/code/Magento/Bundle/view/frontend/web/js/product-summary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
define([
1010
'jquery',
1111
'mage/template',
12-
'jquery/ui',
12+
'jquery-ui-modules/widget',
1313
'Magento_Bundle/js/price-bundle'
1414
], function ($, mageTemplate) {
1515
'use strict';

app/code/Magento/Bundle/view/frontend/web/js/slide.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
define([
1010
'jquery',
11-
'jquery/ui'
11+
'jquery-ui-modules/widget'
1212
], function ($) {
1313
'use strict';
1414

app/code/Magento/Captcha/view/frontend/web/js/captcha.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
define([
77
'jquery',
8-
'jquery/ui'
8+
'jquery-ui-modules/widget'
99
], function ($) {
1010
'use strict';
1111

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types = 1);
7+
8+
namespace Magento\Catalog\Pricing\Price;
9+
10+
use Magento\Framework\App\ObjectManager;
11+
use Magento\Framework\Pricing\SaleableInterface;
12+
use Magento\Store\Model\StoreManagerInterface;
13+
use Magento\Framework\Pricing\Price\Factory;
14+
use Magento\Framework\Pricing\Price\Pool;
15+
16+
/**
17+
* Price models collection class.
18+
*/
19+
class Collection extends \Magento\Framework\Pricing\Price\Collection
20+
{
21+
/**
22+
* @var StoreManagerInterface
23+
*/
24+
private $storeManager;
25+
26+
/**
27+
* @param SaleableInterface $saleableItem
28+
* @param Factory $priceFactory
29+
* @param Pool $pool
30+
* @param float $quantity
31+
* @param StoreManagerInterface|null $storeManager
32+
*/
33+
public function __construct(
34+
SaleableInterface $saleableItem,
35+
Factory $priceFactory,
36+
Pool $pool,
37+
$quantity,
38+
StoreManagerInterface $storeManager = null
39+
) {
40+
parent::__construct($saleableItem, $priceFactory, $pool, $quantity);
41+
$this->storeManager = $storeManager ?? ObjectManager::getInstance()->get(StoreManagerInterface::class);
42+
}
43+
44+
/**
45+
* @inheritdoc
46+
*/
47+
public function get($code)
48+
{
49+
$customerGroupId = $this->saleableItem->getCustomerGroupId() ?? '';
50+
$websiteId = $this->storeManager->getStore($this->saleableItem->getStoreId())->getWebsiteId();
51+
$codeKey = $code . '-' . $customerGroupId . '-' . $websiteId;
52+
53+
if (!isset($this->priceModels[$codeKey])) {
54+
$this->priceModels[$codeKey] = $this->priceFactory->create(
55+
$this->saleableItem,
56+
$this->pool[$code],
57+
$this->quantity
58+
);
59+
}
60+
61+
return $this->priceModels[$codeKey];
62+
}
63+
}

app/code/Magento/Catalog/Pricing/Render/FinalPriceBox.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function __construct(
6060
}
6161

6262
/**
63-
* @return string
63+
* @inheritdoc
6464
*/
6565
protected function _toHtml()
6666
{
@@ -182,25 +182,27 @@ public function showMinimalPrice()
182182
*/
183183
public function getCacheKey()
184184
{
185-
return parent::getCacheKey() . ($this->getData('list_category_page') ? '-list-category-page': '');
185+
return parent::getCacheKey()
186+
. ($this->getData('list_category_page') ? '-list-category-page': '')
187+
. ($this->getSaleableItem()->getCustomerGroupId() ?? '');
186188
}
187189

188190
/**
189-
* {@inheritdoc}
190-
*
191-
* @return array
191+
* @inheritdoc
192192
*/
193193
public function getCacheKeyInfo()
194194
{
195195
$cacheKeys = parent::getCacheKeyInfo();
196196
$cacheKeys['display_minimal_price'] = $this->getDisplayMinimalPrice();
197197
$cacheKeys['is_product_list'] = $this->isProductList();
198+
$cacheKeys['customer_group_id'] = $this->getSaleableItem()->getCustomerGroupId();
198199
return $cacheKeys;
199200
}
200201

201202
/**
202-
* Get flag that price rendering should be done for the list of products
203-
* By default (if flag is not set) is false
203+
* Get flag that price rendering should be done for the list of products.
204+
*
205+
* By default (if flag is not set) is false.
204206
*
205207
* @return bool
206208
*/

app/code/Magento/Catalog/etc/di.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,11 @@
377377
</argument>
378378
</arguments>
379379
</virtualType>
380-
<virtualType name="Magento\Catalog\Pricing\Price\Collection" type="Magento\Framework\Pricing\Price\Collection">
380+
<type name="Magento\Catalog\Pricing\Price\Collection">
381381
<arguments>
382382
<argument name="pool" xsi:type="object">Magento\Catalog\Pricing\Price\Pool</argument>
383383
</arguments>
384-
</virtualType>
384+
</type>
385385
<type name="Magento\Framework\Pricing\PriceInfo\Factory">
386386
<arguments>
387387
<argument name="types" xsi:type="array">

app/code/Magento/Catalog/view/base/web/js/price-box.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ define([
1111
'Magento_Catalog/js/price-utils',
1212
'underscore',
1313
'mage/template',
14-
'jquery/ui'
14+
'jquery-ui-modules/widget'
1515
], function ($, utils, _, mageTemplate) {
1616
'use strict';
1717

app/code/Magento/Catalog/view/base/web/js/price-option-date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ define([
77
'jquery',
88
'priceUtils',
99
'priceOptions',
10-
'jquery/ui'
10+
'jquery-ui-modules/widget'
1111
], function ($, utils) {
1212
'use strict';
1313

0 commit comments

Comments
 (0)