Skip to content

Commit f2314aa

Browse files
Merge pull request #1417 from magento-engcom/develop-prs
[EngCom] Public Pull Requests - MAGETWO-71578: Magento\Test\Js\LiveCodeTest is failing because of reference to missing file in blacklist #10536 - MAGETWO-71544: Handle lifetime value 0 for form_key cookie #10528 - MAGETWO-71542: Show shipping methods in shipping estimator as loading during estimation #10514
2 parents 45896ba + e89bea1 commit f2314aa

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/cart/shipping-estimation.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ define(
1414
'uiRegistry',
1515
'Magento_Checkout/js/model/quote',
1616
'Magento_Checkout/js/model/checkout-data-resolver',
17+
'Magento_Checkout/js/model/shipping-service',
1718
'mage/validation'
1819
],
1920
function (
@@ -26,7 +27,8 @@ define(
2627
shippingRatesValidator,
2728
registry,
2829
quote,
29-
checkoutDataResolver
30+
checkoutDataResolver,
31+
shippingService
3032
) {
3133
'use strict';
3234

@@ -41,9 +43,15 @@ define(
4143
*/
4244
initialize: function () {
4345
this._super();
46+
47+
// Prevent shipping methods showing none available whilst we resolve
48+
shippingService.isLoading(true);
49+
4450
registry.async('checkoutProvider')(function (checkoutProvider) {
4551
var address, estimatedAddress;
4652

53+
shippingService.isLoading(false);
54+
4755
checkoutDataResolver.resolveEstimationAddress();
4856
address = quote.isVirtual() ? quote.billingAddress() : quote.shippingAddress();
4957

app/code/Magento/Checkout/view/frontend/web/template/cart/shipping-rates.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
-->
77
<form id="co-shipping-method-form" data-bind="blockLoader: isLoading, visible: isVisible()">
8-
<p class="field note" data-bind="visible: (shippingRates().length <= 0)">
8+
<p class="field note" data-bind="visible: (!isLoading() && shippingRates().length <= 0)">
99
<!-- ko text: $t('Sorry, no quotes are available for this order at this time')--><!-- /ko -->
1010
</p>
1111
<fieldset class="fieldset rate" data-bind="visible: (shippingRates().length > 0)">

app/code/Magento/PageCache/Observer/RegisterFormKeyFromCookie.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ private function updateCookieFormKey($formKey)
8888
->createPublicCookieMetadata();
8989
$cookieMetadata->setDomain($this->sessionConfig->getCookieDomain());
9090
$cookieMetadata->setPath($this->sessionConfig->getCookiePath());
91-
$cookieMetadata->setDuration($this->sessionConfig->getCookieLifetime());
91+
$lifetime = $this->sessionConfig->getCookieLifetime();
92+
if ($lifetime !== 0) {
93+
$cookieMetadata->setDuration($lifetime);
94+
}
9295

9396
$this->cookieFormKey->set(
9497
$formKey,

app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/_cart.less

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@
6363

6464
.field {
6565
margin: 0 0 16px;
66-
67-
&.note {
68-
display: none;
69-
}
7066
}
7167

7268
.actions-toolbar {

dev/tests/static/testsuite/Magento/Test/Js/_files/jshint/blacklist/core.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module Magento_Captcha view/frontend/web/onepage.js
33
module Magento_Catalog view/adminhtml/web/catalog/category/edit.js
44
module Magento_Catalog view/adminhtml/web/catalog/product.js
55
module Magento_Catalog view/adminhtml/web/catalog/product/composite/configure.js
6-
module Magento_Checkout view/frontend/web/js/opcheckout.js
76
module Magento_Rule view/adminhtml/web/rules.js
87
module Magento_Sales view/adminhtml/web/order/create/giftmessage.js
98
module Magento_Sales view/adminhtml/web/order/create/scripts.js

0 commit comments

Comments
 (0)