try to refresh total with recalculation by delivery and delivery_type

This commit is contained in:
ludo
2023-11-16 00:00:05 +01:00
parent 174c4ca0e2
commit 9d520abfcf
3 changed files with 36 additions and 2 deletions

View File

@@ -29,7 +29,9 @@
@if ($basket['count'])
<div class="col-4">
<x-card class='shadow'>
@include('Shop.Baskets.partials.basketTotal', ['basket' => $basket])
<div id="basketTotal">
@include('Shop.Baskets.partials.basketTotal', ['basket' => $basket])
</div>
</x-card>
</div>
@endif
@@ -61,6 +63,13 @@
}
});
function refreshBasketTotal(deliveryId, deliveryTypeId) {
options = deliveryId + '/' + deliveryTypeId;
$.get("{{ Route('Shop.Basket.getBasketTotal') }}/" + options, function(data) {
$('#basketTotal').html(data);
});
}
initChevron();
</script>
@endpush