enhance add to basket

This commit is contained in:
Ludovic CANDELLIER
2022-04-01 00:11:15 +02:00
parent eff2cb21c7
commit 6e133246cf
17 changed files with 359 additions and 53 deletions

View File

@@ -32,14 +32,32 @@
'offer_id': offer_id,
'quantity': quantity,
};
$.post('{{ route("Shop.Basket.addBasket") }}', data, function() {
console.log('ici');
});
console.log(type);
console.log(offer_id);
console.log(quantity);
console.log(data);
});
var buttons = {
cancel: {
label: '{{ __('Continuer mes achats') }}',
className: 'btn-secondary'
},
confirm: {
label: '{{ __('Commander') }}',
className: 'btn-success',
callback: function() {
submitModal(form_id);
}
},
};
openModal(
'Ajout dans le panier',
'basket-form',
"{{ route('Shop.Basket.modalBasket') }}/" + offer_id + '/' + quantity,
"{{ route('Shop.Basket.addBasket') }}",
false,
false,
true,
buttons
);
});
function setPrice(model) {
var offer_id = $('#' + model + '-offer_id').find('option:selected').val();

View File

@@ -20,3 +20,5 @@
</div>
</div>
@endsection
@include('load.layout.modal')