diff --git a/view/frontend/web/js/model/checkout.js b/view/frontend/web/js/model/checkout.js index 45c950d7..33af2d88 100644 --- a/view/frontend/web/js/model/checkout.js +++ b/view/frontend/web/js/model/checkout.js @@ -177,7 +177,7 @@ function( const hasDeliveryOptions = Model.hasDeliveryOptions(); const myParcelMethods = hasDeliveryOptions ? Model.configuration().methods || [] : []; const cell = document.getElementById('label_method_' + rate.method_code + '_' + rate.carrier_code) || null; - +console.warn(Model); if (!rate.available || !cell) { return; } @@ -289,24 +289,17 @@ function( })); } - function isEuCountry(shippingCountry) { - return EU_COUNTRIES.includes(shippingCountry); - } - function updateHasDeliveryOptions() { let isAllowed = false; const shippingCountry = quote.shippingAddress().countryId; - if (isEuCountry(shippingCountry)) { - - Model.allowedShippingMethods().forEach(function(carrierCode) { - const rate = Model.findOriginalRateByCarrierCode(carrierCode); + Model.allowedShippingMethods().forEach(function(carrierCode) { + const rate = Model.findOriginalRateByCarrierCode(carrierCode); + if (rate && rate.available) { + isAllowed = true; + } + }); - if (rate && rate.available) { - isAllowed = true; - } - }); - } Model.hasDeliveryOptions(isAllowed); Model.hideShippingMethods(); }