From a557e17586523069d2541239adad7ace15218d15 Mon Sep 17 00:00:00 2001 From: Gustavo Luigi Date: Thu, 1 Sep 2022 12:20:30 +0200 Subject: [PATCH] . --- content/master.blade.php | 4 ++-- content/pages/checkout.blade.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/master.blade.php b/content/master.blade.php index 1828778..9cb91fb 100644 --- a/content/master.blade.php +++ b/content/master.blade.php @@ -131,7 +131,6 @@ $('#list-products-in-bag').html(''); totalPrice = 0; if(objProducts.length > 0) { - $('#count-products-in-bag').show(); let ids = objProducts.map(obj => obj.id); $.get($('meta[name="get-contents"]').attr('content')+"/"+ids.join(","), function(response, status){ response.contents.forEach(function(item){ @@ -162,13 +161,14 @@ }); $('#total-price').text(formatter.format(totalPrice)); }); + $('#count-products-in-bag').show(); $('#list-products-in-bag').parent().parent().parent().parent().parent().find('.modal-footer').show(); $('#total-price').parent().parent().parent().show(); $('#no-products').hide(); }else { + $('#count-products-in-bag').hide(); $('#list-products-in-bag').parent().parent().parent().parent().parent().find('.modal-footer').hide(); $('#total-price').parent().parent().parent().hide(); - $('#count-products-in-bag').hide(); $('#no-products').show(); } $('#total-price').text(formatter.format(totalPrice)); diff --git a/content/pages/checkout.blade.php b/content/pages/checkout.blade.php index 4d21781..d9a7625 100644 --- a/content/pages/checkout.blade.php +++ b/content/pages/checkout.blade.php @@ -203,8 +203,8 @@ console.log(addressComponents); $('#street-number').val(getAddressFiedlValue(addressComponents, 'street_number')); $('#route').val(getAddressFiedlValue(addressComponents, 'route')); - $('#sublocality-level-1').val(getAddressFiedlValue(addressComponents, 'locality')); - $('#locality').val(getAddressFiedlValue(addressComponents, 'street_number')); + $('#sublocality-level-1').val(getAddressFiedlValue(addressComponents, 'sublocality_level_1')); + $('#locality').val(getAddressFiedlValue(addressComponents, 'locality')); $('#administrative-area-level-3').val(getAddressFiedlValue(addressComponents, 'administrative_area_level_3')); $('#administrative-area-level-2').val(getAddressFiedlValue(addressComponents, 'administrative_area_level_2')); $('#administrative-area-level-1').val(getAddressFiedlValue(addressComponents, 'administrative_area_level_1'));