@extends('front.frontLayout') @section('title','Carts') @section('pagelevelcss') @stop @section('content') @if(count($carts) > 0)
@php $totale_price = 0; $date_check = 0; @endphp @if(count($carts) > 0) @foreach($carts as $value) @if($value->package) @php $appointment_date = Carbon\Carbon::parse($value->cart_booking->appointment_date)->format('m/d/Y'); $appointment_date_time = $appointment_date . ' ' . $value->cart_booking->appointment_time; $time_in_24_hour_format = date("d-m-Y H:i:s", strtotime($appointment_date_time)); $todaytDate = date('d-m-Y H:i:s'); $today_time = strtotime($todaytDate); $appointment_time = strtotime($time_in_24_hour_format); if($appointment_time < $today_time){ $date_check = 1; } @endphp @php if($value->quantity){ $totale_price += ($value->package->price * $value->quantity); } else { $totale_price += $value->package->price; } @endphp @elseif($value->order) @php $appointment_date_time = $value->order->appointment->app_date . ' ' . $value->order->appointment->app_time; $date = \DateTime::createFromFormat("m-d-Y g:i a" , $appointment_date_time); $time_in_24_hour_format = $date->format('d-m-Y H:i:s'); $todaytDate = date('d-m-Y H:i:s'); $today_time = strtotime($todaytDate); $appointment_time = strtotime($time_in_24_hour_format); if($appointment_time < $today_time){ $date_check = 1; } @endphp @php if($value->quantity){ $totale_price += ($value->order->test_price * $value->quantity); } else { $totale_price += $value->order->test_price; } @endphp @endif @endforeach @endif
Product Name & Details Appointment Date Appointment Time Price Quantity Total Action
{{ $value->package->name }}
{{ $value->package->name }} Price: {{config('app.covid_currency')}}{{ number_format($value->package->price, 2, '.', '') }}   Category: {{ $value->package->package_category->name }}  
{{ Carbon\Carbon::parse($value->cart_booking->appointment_date)->format('m-d-Y') }} {{ $value->cart_booking->appointment_time }} {{config('app.covid_currency')}}{{ number_format($value->package->price, 2, '.', '') }} {{ $value->quantity }} {{config('app.covid_currency')}}{{ @($value->quantity) ? number_format($value->package->price * $value->quantity, 2, '.', '') : number_format($value->package->price, 2, '.', '') }} ×
{{ ($value->order->kittype == 'pcr') ? 'RT-PCR' : 'Rapid Antigen test' }} Price: {{config('app.covid_currency')}}{{ $value->order->test_price }}  
{{ $value->order->appointment->app_date }} {{ $value->order->appointment->app_time }} {{config('app.covid_currency')}}{{ $value->order->test_price }} {{ $value->quantity }} {{config('app.covid_currency')}}{{ @($value->quantity) ? number_format($value->order->test_price * $value->quantity, 2, '.', '') : number_format($value->order->test_price, 2, '.', '') }} ×
@if(count($carts) > 0)
{{config('app.covid_currency')}}{{ number_format($totale_price, 2, '.', '') }}
Back to shopping @if($date_check == 1) Checkout @else Checkout @endif
@if($date_check == 1)
Appointment date is not validate please update date.
@endif @endif
@else

Your Cart is Empty

Add something to make me happy :)

continue shopping
@endif @endsection @section('pageleveljs') @stop