Skip to content

Commit e89bea1

Browse files
MAGETWO-71542: Show shipping methods in shipping estimator as loading during estimation #10514
2 parents 4294090 + fd0663b commit e89bea1

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
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/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 {

0 commit comments

Comments
 (0)