@extends('site.layouts.app') @section('title', 'Checkout') @section('content') {{-- {{ dd(session('cart')) }} --}}
@if (session('cart'))
@csrf
@if (session('cart')) @php $total = 0 @endphp @if (session('cart')) @foreach (session('cart') as $id => $details) @php $total += $details['price'] * $details['quantity']; // $total = round($total, 2); @endphp @endforeach @endif
  Product Price Quantity Total
@if (!empty($details['variant_id'])) @php $colorImage = App\Models\ProductVariant::where( 'id', $details['variant_id'] )->first(); @endphp @if ($colorImage ) {{ $details['image'] }} @endif @else {{ $details['image'] }} @endif {{ ucwords($details['name']) }} {{ $details['price'] }} {{ $details['quantity'] }} ${{ $details['price'] * $details['quantity'] }}
@else

No product in cart

@endif
@php $sender = App\Models\Country::where('id', auth()->user()->country_id)->first(); $sender_country_name = $sender->name; @endphp
{{--

Sender Details

@php $sender = App\Models\Country::where('id', auth()->user()->country_id) ->first(); $sender_country_name = $sender->name; @endphp @if (isset($sender))
@else Kindly set your country for shop Click here @endif
--}}

Receiver Details


@php $country = App\Models\Country::where( 'id', session()->get('country_id'), )->first(); @endphp @if (isset($country))
@else Kindly set your country for shop Click here @endif
@if ($country->name == 'Indonesia')
@else
@endif
@php $wishing_card_categories = App\Models\WishingCategory::get(); @endphp @foreach ($wishing_card_categories as $key => $category)
@php $wishing_cards = App\Models\WishingCard::where( 'wishing_category_id', $category->id, )->get(); @endphp @foreach ($wishing_cards as $w => $wishing) @php $key++; @endphp
@endforeach
@endforeach
Cart Total
Subtotal {{ str_replace('_', '', $sender->currency) }} {{ number_format($total) }}
Shipping Cost {{ str_replace('_', '', $sender->currency) }} 0
Total {{ str_replace('_', '', $sender->currency) }} {{ number_format($total) }}
@else

No product in cart

@endif
@endsection