@extends('layouts.vendor') @section('content')

Rent Cart

@if ($cartItems->isEmpty())
Your cart is empty. Browse products to add items.
@else @php $firstItem = $cartItems->first(); @endphp @foreach ($cartItems as $item)
{{ $item->product_name }}

{{ $item->product_name }}

{{ $item->vendor_address }}

@if ($item->coupon_code) {{--
Coupon Applied: {{ $item->coupon_code }}
-{{ number_format($item->discount, 2) }}€ discount
--}}
Coupon Applied: {{ strtoupper(trim($item->coupon_code, '[]" ')) }}
- {{ number_format($item->discount, 2, ',', '') }} €
@endif

car information:

Brand:
{{ $item->car_name ?? 'N/A' }}
Model:
{{ $item->model ?? 'N/A' }}
Year:
{{ $item->car_year ?? 'N/A' }}
railing type:
{{ $item->roof_type ?? 'N/A' }}
trailer hitch:
{{ $item->trailer_hitch ? 'Yes' : 'No' }}

renting details:

from:
{{ \Carbon\Carbon::parse($item->pickup_date)->format('d.m.Y') }}
to:
{{ \Carbon\Carbon::parse($item->dropoff_date)->format('d.m.Y') }}
pickup date & time:
{{ \Carbon\Carbon::parse($item->pickup_date)->format('d.m.Y') }} | {!! $item->pickup_time ? \Carbon\Carbon::parse($item->pickup_time)->format('H:i') : 'Not set' !!}
dropoff date & time:
{{ \Carbon\Carbon::parse($item->dropoff_date)->format('d.m.Y') }} | {!! $item->dropoff_time ? \Carbon\Carbon::parse($item->dropoff_time)->format('H:i') : 'Not set' !!}

rent information:

Quanity:
01
Rental days:
{{ $item->days }}
for {{ $item->days }} days:
Total {{ number_format($item->calculated_rent, 2) }}€
@if ($item->is_carrier_included)
Carrier Included
length:
{{ $item->carrier_length ?? 'N/A' }}
Foot kit:
{{ $item->footkit_sku ?? 'N/A' }}
Foot:
{{ $item->foot_sku ?? 'N/A' }}
@endif @if ($item->is_insured)
Volkassko Insurance 25 €
@endif
@endforeach {{--
Have a coupon?
--}}
Have a coupon?
@endif
@if (!$cartItems->isEmpty())
Cart Totals
Subtotal
{{ number_format($subtotal, 2, ',', '') }} €
Discount
{{ number_format($discount, 2, ',', '') }} €
Net Price
{{ number_format($netPrice, 2, ',', '') }} €
Net Price Insurance
{{ number_format($insuranceTotal, 2, ',', '') }} €
Tax (19%)
{{ number_format($tax, 2, ',', '') }} €
Total
{{ number_format($total, 2, ',', '') }} €
@php $hasMissingTimes = false; foreach ($cartItems as $item) { if (empty($item->pickup_time) || empty($item->dropoff_time)) { $hasMissingTimes = true; $itemWithMissingTime = $item; break; } } $href = $hasMissingTimes ? route('vendor.cart.confirm', ['cartItem' => $itemWithMissingTime->id]) : route('vendor.checkout.index'); @endphp Checkout
@endif
@endsection