Skip to content

Commit 81e60ed

Browse files
committed
Merge remote-tracking branch 'origin/develop' into MAGETWO-55695
2 parents dc398ad + a220ef9 commit 81e60ed

File tree

65 files changed

+3501
-136
lines changed

Some content is hidden

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

65 files changed

+3501
-136
lines changed

app/code/Magento/Checkout/i18n/en_US.csv

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ Login,Login
121121
Close,Close
122122
item,item
123123
items,items
124-
"Go to Checkout","Go to Checkout"
125124
"Recently added item(s)","Recently added item(s)"
126125
"View and edit cart","View and edit cart"
127126
"See Details","See Details"

app/code/Magento/Checkout/view/frontend/web/js/view/cart/totals.js

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,28 @@
22
* Copyright © 2016 Magento. All rights reserved.
33
* See COPYING.txt for license details.
44
*/
5-
define(
6-
[
7-
'uiComponent',
8-
'Magento_Checkout/js/model/totals',
9-
'Magento_Checkout/js/model/shipping-service'
10-
],
11-
function (Component, totalsService, shippingService) {
12-
'use strict';
5+
define([
6+
'jquery',
7+
'uiComponent',
8+
'Magento_Checkout/js/model/totals',
9+
'Magento_Checkout/js/model/shipping-service'
10+
], function ($, Component, totalsService, shippingService) {
11+
'use strict';
1312

14-
return Component.extend({
13+
return Component.extend({
14+
isLoading: totalsService.isLoading,
1515

16-
isLoading: totalsService.isLoading,
17-
18-
/**
19-
* @override
20-
*/
21-
initialize: function () {
22-
this._super();
23-
totalsService.totals.subscribe(function () {
24-
window.dispatchEvent(new Event('resize'));
25-
});
26-
shippingService.getShippingRates().subscribe(function () {
27-
window.dispatchEvent(new Event('resize'));
28-
});
29-
}
30-
});
31-
}
32-
);
16+
/**
17+
* @override
18+
*/
19+
initialize: function () {
20+
this._super();
21+
totalsService.totals.subscribe(function () {
22+
$(window).trigger('resize');
23+
});
24+
shippingService.getShippingRates().subscribe(function () {
25+
$(window).trigger('resize');
26+
});
27+
}
28+
});
29+
});

app/code/Magento/Checkout/view/frontend/web/template/minicart/content.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@
3636
<!-- /ko -->
3737
</div>
3838

39-
<!-- ko if: getCartParam('possible_onepage_checkout') -->
40-
<!-- ko foreach: getRegion('subtotalContainer') -->
41-
<!-- ko template: getTemplate() --><!-- /ko -->
42-
<!-- /ko -->
39+
<!-- ko foreach: getRegion('subtotalContainer') -->
40+
<!-- ko template: getTemplate() --><!-- /ko -->
4341
<!-- /ko -->
4442

4543
<!-- ko foreach: getRegion('extraInfo') -->
@@ -56,11 +54,11 @@
5654
data-action="close"
5755
data-bind="
5856
attr: {
59-
title: $t('Go to Checkout')
57+
title: $t('Proceed to Checkout')
6058
},
6159
click: closeMinicart()
6260
">
63-
<!-- ko i18n: 'Go to Checkout' --><!-- /ko -->
61+
<!-- ko i18n: 'Proceed to Checkout' --><!-- /ko -->
6462
</button>
6563
<div data-bind="html: getCartParam('extra_actions')"></div>
6664
</div>

app/code/Magento/Customer/view/frontend/templates/address/edit.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@
7575
value="<?php echo $block->escapeHtml($block->getStreetLine(1)) ?>"
7676
title="<?php /* @escapeNotVerified */ echo __('Street Address') ?>"
7777
id="street_1"
78-
class="input-text <?php /* @escapeNotVerified */
79-
echo $_streetValidationClass ?>"/>
78+
class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>"/>
8079
<div class="nested">
8180
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
8281
<?php for ($_i = 1, $_n = $this->helper('Magento\Customer\Helper\Address')->getStreetLines(); $_i < $_n; $_i++): ?>
@@ -88,7 +87,8 @@
8887
<input type="text" name="street[]"
8988
value="<?php echo $block->escapeHtml($block->getStreetLine($_i + 1)) ?>"
9089
title="<?php /* @escapeNotVerified */ echo __('Street Address %1', $_i + 1) ?>"
91-
id="street_<?php /* @escapeNotVerified */ echo $_i + 1 ?>" echo $_streetValidationClass ?>">
90+
id="street_<?php /* @escapeNotVerified */ echo $_i + 1 ?>"
91+
class="input-text <?php /* @escapeNotVerified */ echo $_streetValidationClass ?>">
9292
</div>
9393
</div>
9494
<?php endfor; ?>

app/code/Magento/Dhl/view/frontend/web/js/model/shipping-rates-validation-rules.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ define(
1616
},
1717
'country_id': {
1818
'required': true
19+
},
20+
'city': {
21+
'required': true
1922
}
2023
};
2124
}

app/code/Magento/Fedex/Model/Carrier.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ public function setRequest(RateRequest $request)
338338
} else {
339339
}
340340

341+
if ($request->getDestCity()) {
342+
$r->setDestCity($request->getDestCity());
343+
}
344+
341345
$weight = $this->getTotalNumOfBoxes($request->getPackageWeight());
342346
$r->setWeight($weight);
343347
if ($request->getFreeMethodWeight() != $request->getPackageWeight()) {
@@ -432,6 +436,10 @@ protected function _formRateRequest($purpose)
432436
],
433437
];
434438

439+
if ($r->getDestCity()) {
440+
$ratesRequest['RequestedShipment']['Recipient']['Address']['City'] = $r->getDestCity();
441+
}
442+
435443
if ($purpose == self::RATE_REQUEST_GENERAL) {
436444
$ratesRequest['RequestedShipment']['RequestedPackageLineItems'][0]['InsuredValue'] = [
437445
'Amount' => $r->getValue(),

app/code/Magento/Fedex/Test/Unit/Model/CarrierTest.php

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,30 @@ protected function setUp()
148148
);
149149
}
150150

151+
public function testSetRequestWithoutCity()
152+
{
153+
$requestMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Address\RateRequest::class)
154+
->disableOriginalConstructor()
155+
->setMethods(['getDestCity'])
156+
->getMock();
157+
$requestMock->expects($this->once())
158+
->method('getDestCity')
159+
->willReturn(null);
160+
$this->_model->setRequest($requestMock);
161+
}
162+
163+
public function testSetRequestWithCity()
164+
{
165+
$requestMock = $this->getMockBuilder(\Magento\Quote\Model\Quote\Address\RateRequest::class)
166+
->disableOriginalConstructor()
167+
->setMethods(['getDestCity'])
168+
->getMock();
169+
$requestMock->expects($this->exactly(2))
170+
->method('getDestCity')
171+
->willReturn('Small Town');
172+
$this->_model->setRequest($requestMock);
173+
}
174+
151175
/**
152176
* Callback function, emulates getValue function
153177
* @param $path
@@ -194,7 +218,16 @@ public function testCollectRatesRateAmountOriginBased($amount, $rateType, $expec
194218
$this->_model->expects($this->any())->method('_getCachedQuotes')->will(
195219
$this->returnValue(serialize($response))
196220
);
197-
$request = $this->getMock(\Magento\Quote\Model\Quote\Address\RateRequest::class, [], [], '', false);
221+
$request = $this->getMock(
222+
\Magento\Quote\Model\Quote\Address\RateRequest::class,
223+
['getDestCity'],
224+
[],
225+
'',
226+
false
227+
);
228+
$request->expects($this->exactly(2))
229+
->method('getDestCity')
230+
->willReturn('Wonderful City');
198231
foreach ($this->_model->collectRates($request)->getAllRates() as $allRates) {
199232
$this->assertEquals($expected, $allRates->getData('cost'));
200233
}

app/code/Magento/Fedex/view/frontend/web/js/model/shipping-rates-validation-rules.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ define(
1616
},
1717
'country_id': {
1818
'required': true
19+
},
20+
'city': {
21+
'required': true
1922
}
2023
};
2124
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Sales\Api\Data;
7+
8+
/**
9+
* Interface CommentInterface
10+
*
11+
* @api
12+
*/
13+
interface CommentInterface
14+
{
15+
/**
16+
* Gets the comment for the invoice.
17+
*
18+
* @return string Comment.
19+
*/
20+
public function getComment();
21+
22+
/**
23+
* Sets the comment for the invoice.
24+
*
25+
* @param string $comment
26+
* @return $this
27+
*/
28+
public function setComment($comment);
29+
30+
/**
31+
* Gets the is-visible-on-storefront flag value for the invoice.
32+
*
33+
* @return int Is-visible-on-storefront flag value.
34+
*/
35+
public function getIsVisibleOnFront();
36+
37+
/**
38+
* Sets the is-visible-on-storefront flag value for the invoice.
39+
*
40+
* @param int $isVisibleOnFront
41+
* @return $this
42+
*/
43+
public function setIsVisibleOnFront($isVisibleOnFront);
44+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Sales\Api\Data;
8+
9+
/**
10+
* Interface InvoiceCommentCreationInterface
11+
*
12+
* @api
13+
*/
14+
interface InvoiceCommentCreationInterface extends \Magento\Sales\Api\Data\CommentInterface
15+
{
16+
17+
}

0 commit comments

Comments
 (0)