@extends('layouts.app') @section('title', 'Shopping Cart') @section('content')

Shopping Cart

@if($cartItems->count() > 0)
{{-- Cart Items --}}
@foreach($cartItems as $item)
{{ $item->product->name }}
{{ $item->product->name }}

by {{ $item->product->vendor->shop_name }}

${{ number_format($item->product->current_price, 2) }}

@csrf @method('PATCH')

${{ number_format($item->subtotal, 2) }}

@csrf @method('DELETE')
@endforeach
{{-- Order Summary --}}

Order Summary

{{-- Coupon --}} @if($coupon)
Coupon: {{ $coupon }}
@csrf @method('DELETE')
@else
@csrf
@endif
Subtotal${{ number_format($subtotal, 2) }}
@if($discount > 0)
Discount-${{ number_format($discount, 2) }}
@endif
ShippingCalculated at checkout
Total ${{ number_format($total, 2) }}
@auth Proceed to Checkout @else Login to Checkout @endauth Continue Shopping
@else

Your cart is empty

Add some parts to get started

Shop Now
@endif
@endsection