add basket on rows, uniformize baskets

This commit is contained in:
Ludovic CANDELLIER
2023-03-21 23:16:47 +01:00
parent 06c68dd223
commit 20b3521c72
8 changed files with 52 additions and 51 deletions

View File

@@ -1,6 +1,6 @@
<div class="row mb-3">
<div class="col-4">
<div class="row btn h-100 products @if($article_nature == 1) shadow2 @endif" data-id="semences">
<div class="row btn h-100 products @if($article_nature == 'semences') shadow2 @endif" data-id="semences">
<div class="col-lg-6 col-xs-12">
<img src="/img/article_natures/semences.png" class="img-fluid">
</div>
@@ -8,7 +8,7 @@
</div>
</div>
<div class="col-4">
<div class="row btn h-100 products @if($article_nature == 2) shadow2 @endif" data-id="plants">
<div class="row btn h-100 products @if($article_nature == 'plants') shadow2 @endif" data-id="plants">
<div class="col-lg-6 col-xs-12">
<img src="/img/article_natures/plants.png" class="img-fluid" class="img-fluid">
</div>
@@ -16,7 +16,7 @@
</div>
</div>
<div class="col-4">
<div class="row btn h-100 products @if($article_nature == 3) shadow2 @endif" data-id="legumes">
<div class="row btn h-100 products @if($article_nature == 'legumes') shadow2 @endif" data-id="legumes">
<div class="col-lg-6 col-xs-12">
<img src="/img/article_natures/legumes.png" class="img-fluid" class="img-fluid">
</div>

View File

@@ -46,3 +46,4 @@
});
</script>
@endpush

View File

@@ -7,43 +7,3 @@
</div>
</div>
@endif
@push('js')
<script>
$('.basket').click(function() {
var offer_id = $(this).data('id');
var quantity = 1;
var data = {
'offer_id': offer_id,
'quantity': quantity,
};
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.Orders.order') }}",
"",
false,
true,
buttons,
"refreshBasketTop()",
);
});
</script>
@endpush

View File

@@ -44,4 +44,4 @@
@endsection
@include('load.layout.modal')
@include('load.layout.modal')