fix: add delivery cost on load if delivery is selected
This commit is contained in:
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
@include('load.layout.chevron')
|
@include('load.layout.chevron')
|
||||||
|
|
||||||
@push('js')
|
@prepend('js')
|
||||||
<script>
|
<script>
|
||||||
$('#customer').click(function() {
|
$('#customer').click(function() {
|
||||||
$(".personal_data").addClass('d-none');
|
$(".personal_data").addClass('d-none');
|
||||||
@@ -65,7 +65,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function refreshBasketTotal(deliveryId, deliveryTypeId) {
|
function refreshBasketTotal(deliveryId, deliveryTypeId) {
|
||||||
options = deliveryId + '/' + deliveryTypeId;
|
var safeDeliveryId = deliveryId !== undefined && deliveryId !== null ? deliveryId : '';
|
||||||
|
var safeDeliveryTypeId = deliveryTypeId !== undefined && deliveryTypeId !== null ? deliveryTypeId : '';
|
||||||
|
var options = safeDeliveryId + '/' + safeDeliveryTypeId;
|
||||||
$.get("{{ Route('Shop.Basket.getBasketTotal') }}/" + options, function(data) {
|
$.get("{{ Route('Shop.Basket.getBasketTotal') }}/" + options, function(data) {
|
||||||
$('#basketTotal').html(data);
|
$('#basketTotal').html(data);
|
||||||
});
|
});
|
||||||
@@ -73,4 +75,4 @@
|
|||||||
|
|
||||||
initChevron();
|
initChevron();
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endprepend
|
||||||
|
|||||||
Reference in New Issue
Block a user