@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
Product Name & Details
Appointment Date
Appointment Time
Price
Quantity
Total
Action
@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
{{ 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, '.', '') }}
×
@php
if($value->quantity){
$totale_price += ($value->order->test_price * $value->quantity);
} else {
$totale_price += $value->order->test_price;
}
@endphp
@endif
@endforeach
@endif
{{ $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, '.', '') }}
×