Skip to content

Commit 221e2a4

Browse files
author
Oleksii Korshenko
authored
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - magento-engcom/magento2ce#1325: [EngCom Team] Batch 23. Forwardports to 2.3-develop (by @magento-engcom-team) - #13301: Add @see tag to deprecated property (by @akiojalehto) - #13304: Fix misspellings in method names and deprecate old ones (by @akiojalehto) Fixed GitHub Issues: - #10128: New Orders not being saved to order grid (reported by @joergmaertin) has been fixed in magento-engcom/magento2ce#1325 by @magento-engcom-team in 2.3-develop branch Related commits: 1. e84cb3e 2. 742819b 3. cc2b11f 4. ae8b187 5. 35b3c02 6. eae8936 7. 90e4923 8. b098dbc 9. e8e4cdd 10. 058e5e5 11. 9368d5d 12. bf19409 13. a15ec34 14. 9e4ce76 15. 0995681 16. 6772a2d 17. b0d6bfc 18. b037357 19. 8de5951 - #11740: Sending emails from Admin in Multi-Store Environment defaults to Primary Store (reported by @lee586) has been fixed in magento-engcom/magento2ce#1325 by @magento-engcom-team in 2.3-develop branch Related commits: 1. e84cb3e 2. 742819b 3. cc2b11f 4. ae8b187 5. 35b3c02 6. eae8936 7. 90e4923 8. b098dbc 9. e8e4cdd 10. 058e5e5 11. 9368d5d 12. bf19409 13. a15ec34 14. 9e4ce76 15. 0995681 16. 6772a2d 17. b0d6bfc 18. b037357 19. 8de5951 - #12209: Substitution payment method - Incorrect message (reported by @ihor-sviziev) has been fixed in magento-engcom/magento2ce#1325 by @magento-engcom-team in 2.3-develop branch Related commits: 1. e84cb3e 2. 742819b 3. cc2b11f 4. ae8b187 5. 35b3c02 6. eae8936 7. 90e4923 8. b098dbc 9. e8e4cdd 10. 058e5e5 11. 9368d5d 12. bf19409 13. a15ec34 14. 9e4ce76 15. 0995681 16. 6772a2d 17. b0d6bfc 18. b037357 19. 8de5951 - #12601: A space between the category page and the main footer when applying specific settings (reported by @wd7080) has been fixed in magento-engcom/magento2ce#1325 by @magento-engcom-team in 2.3-develop branch Related commits: 1. e84cb3e 2. 742819b 3. cc2b11f 4. ae8b187 5. 35b3c02 6. eae8936 7. 90e4923 8. b098dbc 9. e8e4cdd 10. 058e5e5 11. 9368d5d 12. bf19409 13. a15ec34 14. 9e4ce76 15. 0995681 16. 6772a2d 17. b0d6bfc 18. b037357 19. 8de5951
2 parents 81ace6a + a6f1fb8 commit 221e2a4

File tree

22 files changed

+290
-25
lines changed

22 files changed

+290
-25
lines changed

app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ protected function _prepareCollection()
9292
protected function _afterLoadCollection()
9393
{
9494
foreach ($this->getCollection() as $item) {
95-
$item->getCustomer() ?: $item->setCustomer('Guest');
95+
$item->getCustomer() ?: $item->setCustomer($item->getBillingAddress()->getName());
9696
}
9797
return $this;
9898
}

app/code/Magento/Checkout/view/frontend/templates/cart/coupon.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<div class="field">
2525
<label for="coupon_code" class="label"><span><?= /* @escapeNotVerified */ __('Enter discount code') ?></span></label>
2626
<div class="control">
27-
<input type="text" class="input-text" id="coupon_code" name="coupon_code" value="<?= $block->escapeHtml($block->getCouponCode()) ?>" placeholder="<?= $block->escapeHtml(__('Enter discount code')) ?>" />
27+
<input type="text" class="input-text" id="coupon_code" name="coupon_code" value="<?= $block->escapeHtml($block->getCouponCode()) ?>" placeholder="<?= $block->escapeHtml(__('Enter discount code')) ?>" <?php if (strlen($block->getCouponCode())): ?> disabled="disabled" <?php endif; ?> />
2828
</div>
2929
</div>
3030
<div class="actions-toolbar">

app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,21 @@ public function __construct(
3636
parent::__construct($context, $data);
3737
}
3838

39+
/**
40+
* @deprecated Misspelled method
41+
* @see getCompatibleInputTypes
42+
*/
43+
public function getComaptibleInputTypes()
44+
{
45+
return $this->getCompatibleInputTypes();
46+
}
47+
3948
/**
4049
* Get compatible input types.
4150
*
4251
* @return array
4352
*/
44-
public function getComaptibleInputTypes()
53+
public function getCompatibleInputTypes()
4554
{
4655
return $this->inputtype->getVolatileInputTypes();
4756
}

app/code/Magento/Eav/Model/AttributeManagement.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class AttributeManagement implements \Magento\Eav\Api\AttributeManagementInterfa
2323
/**
2424
* @var \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection
2525
* @deprecated 100.2.0 please use instead \Magento\Eav\Model\ResourceModel\Entity\Attribute\CollectionFactory
26+
* @see $attributeCollectionFactory
2627
*/
2728
protected $attributeCollection;
2829

app/code/Magento/Indexer/Model/Message/Invalid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function getText()
7171
return __(
7272
'One or more <a href="%1">indexers are invalid</a>. Make sure your <a href="%2" target="_blank">Magento cron job</a> is running.',
7373
$url,
74-
'http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html#config-cli-cron-bkg'
74+
'http://devdocs.magento.com/guides/v2.2/config-guide/cli/config-cli-subcommands-cron.html#create-or-remove-the-magento-crontab'
7575
);
7676
//@codingStandardsIgnoreEnd
7777
}

app/code/Magento/Payment/view/adminhtml/templates/info/substitution.phtml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
*/
1111
?>
1212
<div>
13-
<?php $block->escapeHtml($block->getMethod()->getTitle());?>
13+
<?= $block->getMethod()->getTitle()
14+
? $block->escapeHtml($block->getMethod()->getTitle())
15+
: $block->escapeHtml(__('Payment method')); ?>
1416
<?= $block->escapeHtml(__(' is not available. You still can process offline actions.')) ?>
1517
</div>

app/code/Magento/Review/Controller/Adminhtml/Rating.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,18 @@ public function __construct(
4141
}
4242

4343
/**
44-
* @return void
44+
* @deprecated Misspelled method
45+
* @see initEntityId
4546
*/
4647
protected function initEnityId()
48+
{
49+
$this->initEntityId();
50+
}
51+
52+
/**
53+
* @return void
54+
*/
55+
protected function initEntityId()
4756
{
4857
$this->coreRegistry->register(
4958
'entityId',

app/code/Magento/Review/Controller/Adminhtml/Rating/Edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Edit extends RatingController
1515
*/
1616
public function execute()
1717
{
18-
$this->initEnityId();
18+
$this->initEntityId();
1919
/** @var \Magento\Review\Model\Rating $ratingModel */
2020
$ratingModel = $this->_objectManager->create(\Magento\Review\Model\Rating::class);
2121
if ($this->getRequest()->getParam('id')) {

app/code/Magento/Review/Controller/Adminhtml/Rating/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Index extends RatingController
1515
*/
1616
public function execute()
1717
{
18-
$this->initEnityId();
18+
$this->initEntityId();
1919
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
2020
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
2121
$resultPage->setActiveMenu('Magento_Review::catalog_reviews_ratings_ratings');

app/code/Magento/Review/Controller/Adminhtml/Rating/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Save extends RatingController
1717
*/
1818
public function execute()
1919
{
20-
$this->initEnityId();
20+
$this->initEntityId();
2121
/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
2222
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
2323
if ($this->getRequest()->getPostValue()) {

app/code/Magento/Sales/Model/Order/Email/SenderBuilder.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
*/
66
namespace Magento\Sales\Model\Order\Email;
77

8+
use Magento\Framework\App\ObjectManager;
89
use Magento\Framework\Mail\Template\TransportBuilder;
10+
use Magento\Framework\Mail\Template\TransportBuilderByStore;
911
use Magento\Sales\Model\Order\Email\Container\IdentityInterface;
1012
use Magento\Sales\Model\Order\Email\Container\Template;
1113

@@ -26,19 +28,29 @@ class SenderBuilder
2628
*/
2729
protected $transportBuilder;
2830

31+
/**
32+
* @var TransportBuilderByStore
33+
*/
34+
private $transportBuilderByStore;
35+
2936
/**
3037
* @param Template $templateContainer
3138
* @param IdentityInterface $identityContainer
3239
* @param TransportBuilder $transportBuilder
40+
* @param TransportBuilderByStore $transportBuilderByStore
3341
*/
3442
public function __construct(
3543
Template $templateContainer,
3644
IdentityInterface $identityContainer,
37-
TransportBuilder $transportBuilder
45+
TransportBuilder $transportBuilder,
46+
TransportBuilderByStore $transportBuilderByStore = null
3847
) {
3948
$this->templateContainer = $templateContainer;
4049
$this->identityContainer = $identityContainer;
4150
$this->transportBuilder = $transportBuilder;
51+
$this->transportBuilderByStore = $transportBuilderByStore ?: ObjectManager::getInstance()->get(
52+
TransportBuilderByStore::class
53+
);
4254
}
4355

4456
/**
@@ -98,6 +110,9 @@ protected function configureEmailTemplate()
98110
$this->transportBuilder->setTemplateIdentifier($this->templateContainer->getTemplateId());
99111
$this->transportBuilder->setTemplateOptions($this->templateContainer->getTemplateOptions());
100112
$this->transportBuilder->setTemplateVars($this->templateContainer->getTemplateVars());
101-
$this->transportBuilder->setFrom($this->identityContainer->getEmailIdentity());
113+
$this->transportBuilderByStore->setFromByStore(
114+
$this->identityContainer->getEmailIdentity(),
115+
$this->identityContainer->getStore()->getId()
116+
);
102117
}
103118
}

app/code/Magento/Sales/Test/Unit/Model/Order/Email/SenderBuilderTest.php

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Sales\Test\Unit\Model\Order\Email;
78

9+
use Magento\Framework\Mail\Template\TransportBuilderByStore;
810
use Magento\Sales\Model\Order\Email\SenderBuilder;
911

1012
class SenderBuilderTest extends \PHPUnit\Framework\TestCase
@@ -29,6 +31,16 @@ class SenderBuilderTest extends \PHPUnit\Framework\TestCase
2931
*/
3032
protected $transportBuilder;
3133

34+
/**
35+
* @var \PHPUnit_Framework_MockObject_MockObject
36+
*/
37+
private $storeMock;
38+
39+
/**
40+
* @var \PHPUnit_Framework_MockObject_MockObject
41+
*/
42+
private $transportBuilderByStore;
43+
3244
protected function setUp()
3345
{
3446
$templateId = 'test_template_id';
@@ -42,7 +54,11 @@ protected function setUp()
4254
['getTemplateVars', 'getTemplateOptions', 'getTemplateId']
4355
);
4456

45-
$this->storeMock = $this->createPartialMock(\Magento\Store\Model\Store::class, ['getStoreId', '__wakeup']);
57+
$this->storeMock = $this->createPartialMock(\Magento\Store\Model\Store::class, [
58+
'getStoreId',
59+
'__wakeup',
60+
'getId',
61+
]);
4662

4763
$this->identityContainerMock = $this->createPartialMock(
4864
\Magento\Sales\Model\Order\Email\Container\ShipmentIdentity::class,
@@ -52,15 +68,24 @@ protected function setUp()
5268
'getCustomerName',
5369
'getTemplateOptions',
5470
'getEmailCopyTo',
55-
'getCopyMethod'
71+
'getCopyMethod',
72+
'getStore',
5673
]
5774
);
5875

59-
$this->transportBuilder = $this->createPartialMock(\Magento\Framework\Mail\Template\TransportBuilder::class, [
60-
'addTo', 'addBcc', 'getTransport',
61-
'setTemplateIdentifier', 'setTemplateOptions', 'setTemplateVars',
62-
'setFrom',
63-
]);
76+
$this->transportBuilder = $this->createPartialMock(
77+
\Magento\Framework\Mail\Template\TransportBuilder::class,
78+
[
79+
'addTo',
80+
'addBcc',
81+
'getTransport',
82+
'setTemplateIdentifier',
83+
'setTemplateOptions',
84+
'setTemplateVars',
85+
]
86+
);
87+
88+
$this->transportBuilderByStore = $this->createMock(TransportBuilderByStore::class);
6489

6590
$this->templateContainerMock->expects($this->once())
6691
->method('getTemplateId')
@@ -84,8 +109,8 @@ protected function setUp()
84109
$this->identityContainerMock->expects($this->once())
85110
->method('getEmailIdentity')
86111
->will($this->returnValue($emailIdentity));
87-
$this->transportBuilder->expects($this->once())
88-
->method('setFrom')
112+
$this->transportBuilderByStore->expects($this->once())
113+
->method('setFromByStore')
89114
->with($this->equalTo($emailIdentity));
90115

91116
$this->identityContainerMock->expects($this->once())
@@ -95,7 +120,8 @@ protected function setUp()
95120
$this->senderBuilder = new SenderBuilder(
96121
$this->templateContainerMock,
97122
$this->identityContainerMock,
98-
$this->transportBuilder
123+
$this->transportBuilder,
124+
$this->transportBuilderByStore
99125
);
100126
}
101127

@@ -119,6 +145,12 @@ public function testSend()
119145
$this->identityContainerMock->expects($this->once())
120146
->method('getCustomerName')
121147
->will($this->returnValue($customerName));
148+
$this->identityContainerMock->expects($this->once())
149+
->method('getStore')
150+
->willReturn($this->storeMock);
151+
$this->storeMock->expects($this->once())
152+
->method('getId')
153+
->willReturn(1);
122154
$this->transportBuilder->expects($this->once())
123155
->method('addTo')
124156
->with($this->equalTo($customerEmail), $this->equalTo($customerName));
@@ -145,7 +177,12 @@ public function testSendCopyTo()
145177
$this->transportBuilder->expects($this->once())
146178
->method('addTo')
147179
->with($this->equalTo('example@mail.com'));
148-
180+
$this->identityContainerMock->expects($this->once())
181+
->method('getStore')
182+
->willReturn($this->storeMock);
183+
$this->storeMock->expects($this->once())
184+
->method('getId')
185+
->willReturn(1);
149186
$this->transportBuilder->expects($this->once())
150187
->method('getTransport')
151188
->will($this->returnValue($transportMock));

app/code/Magento/SalesRule/view/frontend/web/template/payment/discount.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
id="discount-code"
2828
name="discount_code"
2929
data-validate="{'required-entry':true}"
30-
data-bind="value: couponCode, attr:{placeholder: $t('Enter discount code')} " />
30+
data-bind="value: couponCode, attr:{disabled:isApplied() , placeholder: $t('Enter discount code')} " />
3131
</div>
3232
</div>
3333
</div>

app/code/Magento/Ui/view/base/web/js/form/element/region.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ define([
3535
return;
3636
}
3737
option = options[value];
38+
39+
if (typeof option === 'undefined') {
40+
return;
41+
}
42+
3843
defaultPostCodeResolver.setUseDefaultPostCode(!option['is_zipcode_optional']);
3944

4045
if (this.skipValidation) {

app/design/adminhtml/Magento/backend/web/css/source/_structure.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ body {
3636
// ToDo UI: should be moved to messages
3737
.notices-wrapper {
3838
margin: 0 3rem;
39+
min-height: 5rem;
3940
.messages {
4041
margin-bottom: 0;
4142
}

app/design/frontend/Magento/blank/Magento_Catalog/web/css/source/_module.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,16 @@
497497
}
498498
}
499499

500+
//
501+
// Category page 1 column layout
502+
// ---------------------------------------------
503+
504+
.catalog-category-view.page-layout-1column {
505+
.column.main {
506+
min-height: inherit;
507+
}
508+
}
509+
500510
}
501511

502512
//

app/design/frontend/Magento/luma/Magento_Catalog/web/css/source/_module.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,16 @@
566566
}
567567
}
568568
}
569+
570+
//
571+
// Category page 1 column layout
572+
// ---------------------------------------------
573+
574+
.catalog-category-view.page-layout-1column {
575+
.column.main {
576+
min-height: inherit;
577+
}
578+
}
569579
}
570580

571581
//

dev/tests/api-functional/testsuite/Magento/Sales/Service/V1/OrderCreateTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ protected function prepareOrder()
140140
[
141141
'shipping' => [
142142
'address' => $address,
143-
'method' => 'Flat Rate - Fixed'
143+
'method' => 'flatrate_flatrate'
144144
],
145145
'items' => [$orderItem->getData()],
146146
'stock_id' => null,
@@ -232,6 +232,9 @@ public function testOrderCreate()
232232
$this->assertEquals($order['grand_total'], $model->getGrandTotal());
233233
$this->assertNotNull($model->getShippingAddress());
234234
$this->assertTrue((bool)$model->getShippingAddress()->getId());
235-
$this->assertEquals('Flat Rate - Fixed', $model->getShippingMethod());
235+
$this->assertEquals('Flat Rate - Fixed', $model->getShippingDescription());
236+
$shippingMethod = $model->getShippingMethod(true);
237+
$this->assertEquals('flatrate', $shippingMethod['carrier_code']);
238+
$this->assertEquals('flatrate', $shippingMethod['method']);
236239
}
237240
}

0 commit comments

Comments
 (0)