Skip to content

Commit d0d1f50

Browse files
merge magento/2.3-develop into magento-chaika/Chaika-PR-2019-09-03-2.3
2 parents d6a6d99 + 32305e0 commit d0d1f50

File tree

12 files changed

+181
-19
lines changed

12 files changed

+181
-19
lines changed

app/code/Magento/Catalog/Model/Product/TierPriceManagement.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,19 @@ public function getList($sku, $customerGroupId)
182182
: $customerGroupId);
183183

184184
$prices = [];
185-
foreach ($product->getData('tier_price') as $price) {
186-
if ((is_numeric($customerGroupId) && (int) $price['cust_group'] === (int) $customerGroupId)
187-
|| ($customerGroupId === 'all' && $price['all_groups'])
188-
) {
189-
/** @var \Magento\Catalog\Api\Data\ProductTierPriceInterface $tierPrice */
190-
$tierPrice = $this->priceFactory->create();
191-
$tierPrice->setValue($price[$priceKey])
192-
->setQty($price['price_qty'])
193-
->setCustomerGroupId($cgi);
194-
$prices[] = $tierPrice;
185+
$tierPrices = $product->getData('tier_price');
186+
if ($tierPrices !== null) {
187+
foreach ($tierPrices as $price) {
188+
if ((is_numeric($customerGroupId) && (int) $price['cust_group'] === (int) $customerGroupId)
189+
|| ($customerGroupId === 'all' && $price['all_groups'])
190+
) {
191+
/** @var \Magento\Catalog\Api\Data\ProductTierPriceInterface $tierPrice */
192+
$tierPrice = $this->priceFactory->create();
193+
$tierPrice->setValue($price[$priceKey])
194+
->setQty($price['price_qty'])
195+
->setCustomerGroupId($cgi);
196+
$prices[] = $tierPrice;
197+
}
195198
}
196199
}
197200
return $prices;

app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
104104
value="<?= $block->escapeHtmlAttr($block->getQty()) ?>"
105105
type="number"
106106
size="4"
107+
step="any"
107108
title="<?= $block->escapeHtmlAttr(__('Qty')) ?>"
108109
class="input-text qty"
109110
data-validate="{required:true,'validate-greater-than-zero':true}"

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,23 @@
202202
</argument>
203203
</arguments>
204204
</virtualType>
205+
206+
<type name="Magento\Config\Model\Config\TypePool">
207+
<arguments>
208+
<argument name="sensitive" xsi:type="array">
209+
<item name="catalog/search/elasticsearch6_password" xsi:type="string">1</item>
210+
<item name="catalog/search/elasticsearch6_server_hostname" xsi:type="string">1</item>
211+
<item name="catalog/search/elasticsearch6_username" xsi:type="string">1</item>
212+
</argument>
213+
<argument name="environment" xsi:type="array">
214+
<item name="catalog/search/elasticsearch6_enable_auth" xsi:type="string">1</item>
215+
<item name="catalog/search/elasticsearch6_index_prefix" xsi:type="string">1</item>
216+
<item name="catalog/search/elasticsearch6_password" xsi:type="string">1</item>
217+
<item name="catalog/search/elasticsearch6_server_hostname" xsi:type="string">1</item>
218+
<item name="catalog/search/elasticsearch6_server_port" xsi:type="string">1</item>
219+
<item name="catalog/search/elasticsearch6_username" xsi:type="string">1</item>
220+
<item name="catalog/search/elasticsearch6_server_timeout" xsi:type="string">1</item>
221+
</argument>
222+
</arguments>
223+
</type>
205224
</config>

app/code/Magento/Sitemap/Controller/Adminhtml/Sitemap/Edit.php

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,30 @@
66

77
namespace Magento\Sitemap\Controller\Adminhtml\Sitemap;
88

9+
use Magento\Backend\App\Action\Context;
10+
use Magento\Backend\Block\Template;
11+
use Magento\Backend\Model\Session;
912
use Magento\Framework\App\Action\HttpGetActionInterface;
13+
use Magento\Framework\Registry;
14+
use Magento\Sitemap\Controller\Adminhtml\Sitemap;
1015

1116
/**
1217
* Controller class Edit. Responsible for rendering of a sitemap edit page
1318
*/
14-
class Edit extends \Magento\Sitemap\Controller\Adminhtml\Sitemap implements HttpGetActionInterface
19+
class Edit extends Sitemap implements HttpGetActionInterface
1520
{
1621
/**
1722
* Core registry
1823
*
19-
* @var \Magento\Framework\Registry
24+
* @var Registry
2025
*/
21-
protected $_coreRegistry = null;
26+
protected $_coreRegistry;
2227

2328
/**
24-
* @param \Magento\Backend\App\Action\Context $context
25-
* @param \Magento\Framework\Registry $coreRegistry
29+
* @param Context $context
30+
* @param Registry $coreRegistry
2631
*/
27-
public function __construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry)
32+
public function __construct(Context $context, Registry $coreRegistry)
2833
{
2934
$this->_coreRegistry = $coreRegistry;
3035
parent::__construct($context);
@@ -53,7 +58,7 @@ public function execute()
5358
}
5459

5560
// 3. Set entered data if was error when we do save
56-
$data = $this->_objectManager->get(\Magento\Backend\Model\Session::class)->getFormData(true);
61+
$data = $this->_objectManager->get(Session::class)->getFormData(true);
5762
if (!empty($data)) {
5863
$model->setData($data);
5964
}
@@ -67,6 +72,8 @@ public function execute()
6772
$id ? __('Edit Sitemap') : __('New Sitemap')
6873
)->_addContent(
6974
$this->_view->getLayout()->createBlock(\Magento\Sitemap\Block\Adminhtml\Edit::class)
75+
)->_addJs(
76+
$this->_view->getLayout()->createBlock(Template::class)->setTemplate('Magento_Sitemap::js.phtml')
7077
);
7178
$this->_view->getPage()->getConfig()->getTitle()->prepend(__('Site Map'));
7279
$this->_view->getPage()->getConfig()->getTitle()->prepend(
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
?>
7+
8+
<script type="text/x-magento-init">
9+
{
10+
"#edit_form": {
11+
"Magento_Sitemap/js/form-submit-loader" : {}
12+
}
13+
}
14+
</script>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'jquery'
8+
], function ($) {
9+
'use strict';
10+
11+
return function (data, element) {
12+
13+
$(element).on('save', function () {
14+
if ($(this).valid()) {
15+
$('body').trigger('processStart');
16+
}
17+
});
18+
};
19+
});

app/code/Magento/Vault/view/frontend/layout/customer_account.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<referenceBlock name="customer_account_navigation">
1212
<block class="Magento\Customer\Block\Account\SortLinkInterface"
1313
name="customer-account-navigation-my-credit-cards-link"
14-
ifconfig="payment/braintree/active"
1514
>
1615
<arguments>
1716
<argument name="path" xsi:type="string">vault/cards/listaction</argument>
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
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\Version\Test\Unit\Controller\Index;
9+
10+
use Magento\Version\Controller\Index\Index as VersionIndex;
11+
use Magento\Framework\App\Action\Context;
12+
use Magento\Framework\App\ProductMetadataInterface;
13+
use Magento\Framework\App\ResponseInterface;
14+
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
15+
16+
/**
17+
* Class \Magento\Version\Test\Unit\Controller\Index\IndexTest
18+
*/
19+
class IndexTest extends \PHPUnit\Framework\TestCase
20+
{
21+
/**
22+
* @var VersionIndex
23+
*/
24+
private $model;
25+
26+
/**
27+
* @var Context
28+
*/
29+
private $context;
30+
31+
/**
32+
* @var ProductMetadataInterface
33+
*/
34+
private $productMetadata;
35+
36+
/**
37+
* @var ResponseInterface
38+
*/
39+
private $response;
40+
41+
/**
42+
* Prepare test preconditions
43+
*/
44+
protected function setUp()
45+
{
46+
$this->context = $this->getMockBuilder(Context::class)
47+
->disableOriginalConstructor()
48+
->getMock();
49+
50+
$this->productMetadata = $this->getMockBuilder(ProductMetadataInterface::class)
51+
->disableOriginalConstructor()
52+
->setMethods(['getName', 'getEdition', 'getVersion'])
53+
->getMock();
54+
55+
$this->response = $this->getMockBuilder(ResponseInterface::class)
56+
->disableOriginalConstructor()
57+
->setMethods(['setBody', 'sendResponse'])
58+
->getMock();
59+
60+
$this->context->expects($this->any())
61+
->method('getResponse')
62+
->willReturn($this->response);
63+
64+
$helper = new ObjectManager($this);
65+
66+
$this->model = $helper->getObject(
67+
'Magento\Version\Controller\Index\Index',
68+
[
69+
'context' => $this->context,
70+
'productMetadata' => $this->productMetadata
71+
]
72+
);
73+
}
74+
75+
/**
76+
* Test with Git Base version
77+
*/
78+
public function testExecuteWithGitBase()
79+
{
80+
$this->productMetadata->expects($this->any())->method('getVersion')->willReturn('dev-2.3');
81+
$this->assertNull($this->model->execute());
82+
}
83+
84+
/**
85+
* Test with Community Version
86+
*/
87+
public function testExecuteWithCommunityVersion()
88+
{
89+
$this->productMetadata->expects($this->any())->method('getVersion')->willReturn('2.3.3');
90+
$this->productMetadata->expects($this->any())->method('getEdition')->willReturn('Community');
91+
$this->productMetadata->expects($this->any())->method('getName')->willReturn('Magento');
92+
$this->response->expects($this->once())->method('setBody')
93+
->with('Magento/2.3 (Community)')
94+
->will($this->returnSelf());
95+
$this->model->execute();
96+
}
97+
}

app/design/adminhtml/Magento/backend/etc/view.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<item type="file">Lib::requirejs/text.js</item>
6464
<item type="file">Lib::date-format-normalizer.js</item>
6565
<item type="file">Lib::varien/js.js</item>
66+
<item type="directory">Magento_Tinymce3::tiny_mce</item>
6667
<item type="directory">Lib::css</item>
6768
<item type="directory">Lib::lib</item>
6869
<item type="directory">Lib::prototype</item>

app/design/frontend/Magento/blank/etc/view.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@
292292
<item type="directory">Magento_Ui::templates/grid</item>
293293
<item type="directory">Magento_Ui::templates/dynamic-rows</item>
294294
<item type="directory">Magento_Swagger::swagger-ui</item>
295+
<item type="directory">Magento_Tinymce3::tiny_mce</item>
295296
<item type="directory">Lib::modernizr</item>
296297
<item type="directory">Lib::tiny_mce</item>
297298
<item type="directory">Lib::varien</item>

app/design/frontend/Magento/luma/etc/view.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@
303303
<item type="directory">Magento_Ui::templates/grid</item>
304304
<item type="directory">Magento_Ui::templates/dynamic-rows</item>
305305
<item type="directory">Magento_Swagger::swagger-ui</item>
306+
<item type="directory">Magento_Tinymce3::tiny_mce</item>
306307
<item type="directory">Lib::modernizr</item>
307308
<item type="directory">Lib::tiny_mce</item>
308309
<item type="directory">Lib::varien</item>

dev/tests/integration/testsuite/Magento/Multishipping/Fixtures/quote_with_configurable_product.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
$objectManager = Bootstrap::getObjectManager();
2323

2424
$product = $productRepository->getById(10);
25-
$product->setStockData(['use_config_manage_stock' => 1, 'qty' => 2, 'is_qty_decimal' => 0, 'is_in_stock' => 1]);
25+
$product->setStockData(['use_config_manage_stock' => 1, 'qty' => 4, 'is_qty_decimal' => 0, 'is_in_stock' => 1]);
2626
$productRepository->save($product);
2727

2828
/** @var Quote $quote */

0 commit comments

Comments
 (0)