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

{{ translate('1. My Cart')}}

{{ translate('2. Shipping info')}}

{{ translate('3. Delivery info')}}

{{ translate('4. Payment')}}

{{ translate('5. Confirmation')}}

@php $first_order = $combined_order->orders->first() @endphp

{{ translate('Thank You for Your Order!')}}

{{ translate('A copy or your order summary has been sent to') }} {{ json_decode($first_order->shipping_address)->email }}

{{ translate('Order Summary')}}
{{ translate('Order date')}}: {{ date('d-m-Y H:i A', $first_order->date) }}
{{ translate('Email')}}: {{ json_decode($first_order->shipping_address)->email }}
{{ translate('Shipping address')}}: {{ json_decode($first_order->shipping_address)->address }}, {{ json_decode($first_order->shipping_address)->city }}, {{ json_decode($first_order->shipping_address)->country }}
{{ translate('Order status')}}: {{ translate(ucfirst(str_replace('_', ' ', $first_order->delivery_status))) }}
{{ translate('Total order amount')}}: {{ single_price($combined_order->grand_total) }}
{{ translate('Shipping')}}: {{ translate('Flat shipping rate')}}
{{ translate('Payment method')}}: {{ translate(ucfirst(str_replace('_', ' ', $first_order->payment_type))) }}
@foreach ($combined_order->orders as $order)

{{ translate('Order Code:')}} {{ $order->code }}

{{ translate('Order Details')}}
@foreach ($order->orderDetails as $key => $orderDetail) @endforeach
# {{ translate('Product')}} {{ translate('Variation')}} {{ translate('Quantity')}} {{ translate('Delivery Type')}} {{ translate('Price')}}
{{ $key+1 }} @if ($orderDetail->product != null) {{ $orderDetail->product->getTranslation('name') }} @php if($orderDetail->combo_id != null) { $combo = \App\ComboProduct::findOrFail($orderDetail->combo_id); echo '('.$combo->combo_title.')'; } @endphp @else {{ translate('Product Unavailable') }} @endif {{ $orderDetail->variation }} {{ $orderDetail->quantity }} @if ($order->shipping_type != null && $order->shipping_type == 'home_delivery') {{ translate('Home Delivery') }} @elseif ($order->shipping_type == 'pickup_point') @if ($order->pickup_point != null) {{ $order->pickup_point->getTranslation('name') }} ({{ translate('Pickip Point') }}) @endif @endif {{ single_price($orderDetail->price) }}
{{ translate('Subtotal')}} {{ single_price($order->orderDetails->sum('price')) }}
{{ translate('Shipping')}} {{ single_price($order->orderDetails->sum('shipping_cost')) }}
{{ translate('Tax')}} {{ single_price($order->orderDetails->sum('tax')) }}
{{ translate('Coupon Discount')}} {{ single_price($order->coupon_discount) }}
{{ translate('Total')}} {{ single_price($order->grand_total) }}
@endforeach
@endsection