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'])
<div class="space-y-2">
@foreach($this->items() as $item)
<div class="flex justify-between text-sm">
<span>{{ $item['quantity'] }}x {{ $item['product_key'] }}</span>
<span>{{ $item['total'] }}</span>
</div>
@if($item['quantity'] > 0)
<div class="flex justify-between text-sm">
<span>{{ $item['quantity'] }}x {{ $item['product_key'] }}</span>
<span>{{ $item['total'] }}</span>
</div>
@endif
@endforeach
</div>