@extends('frontend.layouts.app') @section('content')
@if($order->payment_status == 'paid')

{{ translate('Thank you for your order!')}}

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

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

@else

{{ translate('Your order has been failed.In case of deduction, amount will be refunded within 1 or 2 days!')}}

@endif
{{ translate('Order Summary')}}
{{ translate('Order id')}}: {{ $order->code }}
{{ translate('Name')}}: {{ json_decode($order->shipping_address)->name }}
{{ translate('Email')}}: {{ json_decode($order->shipping_address)->email }}
{{ translate('Shipping address')}}: {{ json_decode($order->shipping_address)->address }} , {{ json_decode($order->shipping_address)->city }} , {{ json_decode($order->shipping_address)->country }}
{{ translate('Billing address')}}: {{ json_decode($order->billing_address)->address }} , {{ json_decode($order->billing_address)->city }} , {{ json_decode($order->billing_address)->country }}
{{ translate('Order date')}}: {{ date('d-m-Y H:i A', $order->date) }}
{{ translate('Order status')}}: {{ ucfirst(str_replace('_', ' ', $order->payment_status)) }}
{{ translate('Total order amount')}}: {{ single_price_new($order->grand_total) }}
{{ translate('Payment method')}}: {{ ucfirst($payoption) }}
{{ translate('Order Details')}}
@foreach ($order->orderDetails as $key => $orderDetail) @endforeach
# {{ translate('Product')}} {{ translate('Variation')}} {{ translate('Quantity')}} {{ translate('Price')}}
{{ $key+1 }} @if ($orderDetail->product != null) {{ $orderDetail->product->name }} @else {{ translate('Product Unavailable') }} @endif {{ $orderDetail->variation }} {{ $orderDetail->quantity }} {{ single_price_new($orderDetail->price) }}
{{ translate('Subtotal')}} {{ single_price_new(@$order->orderDetails->sum('price')) }}
{{ translate('Shipping & Handling Charge')}} @if(@$order->grand_total + @$order->coupon_discount < minShippingAmount()) {{ single_price_new(shippingCharge()) }} @else {{ single_price_new(0) }} @endif
{{ translate('Coupon Discount')}} {{ single_price_new($order->coupon_discount) }}
{{ translate('Total')}} {{ single_price_new($order->grand_total) }}
@endsection @section('script')