Add conditional rendering for items with quantity greater than 0 in summary.blade.php

This commit is contained in:
Benjamin Beganović 2024-02-14 18:30:02 +01:00
parent bc5ec3e1ac
commit c2c939af76

View File

@ -4,10 +4,12 @@
@isset($this->context['bundle']) @isset($this->context['bundle'])
<div class="space-y-2"> <div class="space-y-2">
@foreach($this->items() as $item) @foreach($this->items() as $item)
<div class="flex justify-between text-sm"> @if($item['quantity'] > 0)
<span>{{ $item['quantity'] }}x {{ $item['product_key'] }}</span> <div class="flex justify-between text-sm">
<span>{{ $item['total'] }}</span> <span>{{ $item['quantity'] }}x {{ $item['product_key'] }}</span>
</div> <span>{{ $item['total'] }}</span>
</div>
@endif
@endforeach @endforeach
</div> </div>