Filters collapsed, customer auth and register, fix on basket recalculation
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
</div>
|
||||
@foreach ($basket as $nature => $items)
|
||||
<div class="row mb-3 p-2 bg-green-light border">
|
||||
<div class="row ml-1 mb-3 p-2 bg-green-light border">
|
||||
<div class="col-12">
|
||||
<h2 style="font-size: 1.6em;">{{ ucfirst($nature) }}</h2>
|
||||
@foreach ($items as $item)
|
||||
@@ -75,10 +75,11 @@
|
||||
$('.basket-quantity').change(function() {
|
||||
var offer_id = $(this).data('id');
|
||||
var quantity = $(this).val();
|
||||
var $row = $(this).parents('.row');
|
||||
console.log("add basket");
|
||||
console.log(quantity);
|
||||
updateBasket(offer_id, quantity, function() {
|
||||
calculatePrice($(this).parents('.basket-row'));
|
||||
calculatePrice($row);
|
||||
calculateTotal();
|
||||
});
|
||||
});
|
||||
@@ -98,6 +99,8 @@
|
||||
}
|
||||
|
||||
function calculatePrice($that) {
|
||||
console.log('calculatePrice');
|
||||
console.log($that);
|
||||
var quantity = $that.find('.basket-quantity').val();
|
||||
var price = $that.find('.basket-price').text();
|
||||
var total_price = fixNumber(quantity * price);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="row mb-3 basket-row" id="basket_offer-{{ $item['id'] }}" data-id={{ $item['id'] }}>
|
||||
<div class="row basket-row" id="basket_offer-{{ $item['id'] }}" data-id={{ $item['id'] }}>
|
||||
<div class="col-2 text-center">
|
||||
<img src="{{ $item['image'] }}" class="img-fluid">
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="col-5">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<img src="{{ App\Repositories\Shop\Articles::getPreviewSrc($offer['article']['image'] ?? false) }}" class="card-img-top" alt="...">
|
||||
<img src="{{ $offer['article']['image'] }}" class="card-img-top" alt="...">
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="text-uppercase">
|
||||
|
||||
Reference in New Issue
Block a user