@push('head') @endpush
@if($cartproducts)
@php $total = 0; $subtotal = 0; $prices = []; @endphp @if ($cartproducts) @forelse($cartproducts as $key => $row)
@php $inlinetotal = 0; $variantname = null; $variantprice = 0; $extras = []; $product = \App\Product::where('id', $key)->first(); if ($product) { if (isset($row['variant'])) { foreach ($row['variant'] as $key => $variant) { $addon = \App\Models\Addon::where('id', $variant)->first(); $variantname .= ' ' . $addon->addon_name; $variantprice += $addon->price; } $subtotal += $variantprice * $quantity[$product->id]; $inlinetotal = $variantprice * $quantity[$product->id]; } else { $subtotal += $product->price * $quantity[$product->id]; $inlinetotal = $product->price * $quantity[$product->id]; } if (isset($row['extras'])) { foreach ($row['extras'] as $key => $extra) { $addon = \App\Models\Addon::where('id', $key)->first(); $subtotal = $subtotal + $addon->price; $inlinetotal = $inlinetotal + $addon->price; $extras[$key]['name'] = $addon->addon_name; $extras[$key]['price'] = $addon->price; } } $prices[$product->id] = $inlinetotal; } @endphp

{{ $product->name }} @if ($variantname) ({{ $variantname }}) @endif

@if ($extras) @foreach ($extras as $row)
{{ $row['name'] }} @include('layouts.render.currency',["amount"=>$row['price']])
@endforeach
@include('layouts.render.currency',["amount"=>$prices[$product->id]])
@else
@if ($variantname) @include('layouts.render.currency',["amount"=>$variantprice]) @else @include('layouts.render.currency',["amount"=>$product->price*$quantity[$product->id]]) @endif
@endif
@empty @endforelse @endif
@error('name') {{ $message }} @enderror
@error('phone_number') {{ $message }} @enderror
@error('order_type') {{ $message }} @enderror
@if ($order_type == 3)
@error('address') {{ $message }} @enderror
@endif @if ($order_type == 1) @php $tables = \App\Models\Table::where('store_id', $store->id) ->where('is_active', 1) ->get(); @endphp
@error('table') {{ $message }} @enderror
@endif @if ($order_type == 4)
@error('room') {{ $message }} @enderror
@if($store->is_room_delivery_dob_enable == 1)
@error('roomdob') {{ $message }} @enderror
@endif @endif

{{ $selected_language->data['have_coupon'] ?? 'Have A Coupon?' }}

@error('coupon') {{ $message }} @enderror @error('coupon_success') {{ $message }} @enderror
@php $taxtotal = $subtotal * ($store->tax/100); @endphp @php $total = $subtotal + $store->service_charge + $taxtotal; if($order_type == 3) { $total = $total + $store->delivery_charge; } $couponprice = 0; if ($coupon) { if ($coupon->discount_type == 'AMOUNT') { $couponprice = $coupon->discount; $total = $total - $coupon->discount; } elseif ($coupon->discount_type == 'PERCENTAGE') { $couponprice = ($total * $coupon->discount) / 100; $total = $total - ($total * $coupon->discount) / 100; } } if ($total < 0) { $total = 0; } @endphp

Order Details:

  • {{ $selected_language->data['sub_total'] ?? 'Sub Total' }} @include('layouts.render.currency',["amount"=>$subtotal])

  • {{ $selected_language->data['service_charge'] ?? 'Service Charge' }} @include('layouts.render.currency',["amount"=>$store->service_charge])

  • {{ $selected_language->data['applied_coupon'] ?? 'Applied Coupon' }}-@include('layouts.render.currency',["amount"=>$couponprice])

  • @if($order_type == 3)
  • {{ $selected_language->data['delivery_charge'] ?? 'Delivery Charge' }}@include('layouts.render.currency',["amount"=>$store->delivery_charge])

  • @endif
  • {{ $selected_language->data['menu_tax'] ?? 'Tax' }} ({{ $store->tax ?? '0' }}%)@include('layouts.render.currency',["amount"=>$subtotal * ($store->tax/100)])

@include('layouts.render.currency',["amount"=>$total])

@if($store->is_accept_order == 1) {{ $selected_language->data['checkout'] ?? 'Checkout Now' }} @else {{$selected_language->data['not_accepting_orders'] ?? 'Currently We Are Not Accepting Orders'}} @endif
@if($isCODEnabled == 1)
@endif @if($razorpayEnabled == 1)
@endif @if($isStripeEnabled == 1)
@endif @if($isPaypalEnabled == 1)
@endif @if($isPaystackEnabled == 1)
@endif
{{ $account_info != null ? $account_info->currency_symbol : '₹' }}{{ $total }}
@else
@include('livewire.home.layouts.navbar') @endif

{{$selected_language->data['your_order_placed'] ?? 'Your Order Has Been Placed'}}

{{$selected_language->data['your_order_number_is'] ?? 'Order Number'}} : {{$order_id}}

@if($successmsg)
{{$selected_language->data['payment_id'] ?? 'Payment ID'}} : {{$successmsg}}
@endif
@if($final_order && $store->phone && $store->whatsappbutton_enable ==1) @php function myUrlEncode($string) { $entities = array('%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%25', '%23', '%5B', '%5D'); $replacements = array('!', '*', "'", "(", ")", ";", ":", "@", "&", "=", "+", "$", ",", "/", "?", "%", "#", "[", "]"); return str_replace($entities, $replacements, urlencode($string)); } $products = '%0ACustomer Name: *'.$order->customer_name.'*'; if($order->order_type == 1) { $products .= '%0AOrder Type: *Dining*'; } if($order->order_type == 2) { $products .= '%0AOrder Type: *Takeaway*'; } if($order->order_type == 3) { $products .= '%0AOrder Type: *Delivery*'; } if($order->order_type == 4) { $products .= '%0AOrder Type: *Room*'; } if($order->address != null) { $products .= '%0ACustomer Address : *'.$order->address.'*'; } if($order->customer_phone != null) { $products .= '%0ACustomer Phone: *'.$order->customer_phone.'*'; } if($order->table_no) { $products .= '%0ATable No: *'.$order->table_no.'*'; } if($order->room_number) { $products .= '%0ARoom No: *'.$order->room_number.'*'; } if($order->payment_status == 2) { $products .= '%0A*Order has been paid* '; } $products .= '%0AProduct : '; foreach($final_order as $order_data) { foreach($order_data['order_details'] as $key => $data) { $products .= '%0A*'.$data['name'].'* Quantity : '.$data['quantity']; $products .= '%0AAddons: '; foreach($data['order_details_extra_addon'] as $key => $exra) { $products .= '%0A*'.$exra['addon_name'].'*'; } } } $products .= '%0AOrder ID : *'.$order->order_unique_id.'*'; $products .= '%0ATotal : *'.$order->total.'*'; @endphp @endif
@include('Home.home_layout.stripe') @include('Home.home_layout.paypal')