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

Your Shopping Cart

@if ($cartItems->count() > 0)
    @foreach ($cartItems as $item)
  • @php $displayImage = $item->product->image; if ($item->color && $item->product->color_images && is_array($item->product->color_images) && array_key_exists($item->color, $item->product->color_images) && $item->product->color_images[$item->color]) { $displayImage = $item->product->color_images[$item->color]; } @endphp @if ($displayImage) {{ $item->product->name }} @else {{ $item->product->name }} @endif

    {{ $item->product->name }}

    ৳{{ number_format($item->price, 2) }}

    {{ $item->product->category->name }}

    @if ($item->color)

    Color: {{ $item->color }}

    @endif @if ($item->size)

    Size: {{ $item->size }}

    @endif
    Qty:
  • @endforeach

Order Summary

  • Subtotal
    {{ number_format($cartItems->sum(function ($item) {return $item->quantity * $item->price;}),2) }}
  • Delivery Charge
    100.00
  • Total
    {{ number_format($cartItems->sum(function ($item) {return $item->quantity * $item->price;}) + 100,2) }}
@else

Your cart is empty

Looks like you haven't added any items to your cart yet.

Shop Now
@endif
@endsection